From: cajus Date: Fri, 7 Mar 2008 10:09:08 +0000 (+0000) Subject: Added db messages to msg pool X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d99865585ad2e74e6f97afb7430b0ac864fe5f94;p=gosa.git Added db messages to msg pool git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9424 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/utils/class_msgPool.inc b/gosa-core/include/utils/class_msgPool.inc index d4dc32069..c3624c82c 100644 --- a/gosa-core/include/utils/class_msgPool.inc +++ b/gosa-core/include/utils/class_msgPool.inc @@ -2,6 +2,41 @@ class msgPool { + public static function dbconnect($name, $error= "", $dbinfo= "") + { + if ($error != ""){ + $error= "

"._("Error").": ".$error; + } + if ($dbinfo != ""){ + $error= "

"._("Connection information").": ".$dbinfo; + } + return (sprintf(_("Cannot connect to %s database!"), $name).$error); + } + + + public static function dbselect($name, $error= "", $dbinfo= "") + { + if ($error != ""){ + $error= "

"._("Error").": ".$error; + } + if ($dbinfo != ""){ + $error= "

"._("Connection information").": ".$dbinfo; + } + return (sprintf(_("Cannot select %s database!"), $name).$error); + } + + + public static function dbquery($name, $error= "", $dbinfo= "") + { + if ($error != ""){ + $error= "

"._("Error").": ".$error; + } + if ($dbinfo != ""){ + $error= "

"._("Connection information").": ".$dbinfo; + } + return (sprintf(_("Cannot query %s database!"), $name).$error); + } + public static function reserved($name) { @@ -69,7 +104,7 @@ class msgPool { /* Stylize example */ if ($example != ""){ - $example= "

"._("Example:")." ".$example; + $example= "

"._("Example").": ".$example; } /* If validChars are posted, take data and paint all invalid @@ -99,4 +134,5 @@ class msgPool { return sprintf(_("Missing %s PHP extension!"), $name); } + }