From d99865585ad2e74e6f97afb7430b0ac864fe5f94 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 7 Mar 2008 10:09:08 +0000 Subject: [PATCH] Added db messages to msg pool git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9424 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/utils/class_msgPool.inc | 38 ++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) 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); } + } -- 2.30.2