From: cajus Date: Sat, 8 Mar 2008 15:21:51 +0000 (+0000) Subject: Added ldap error message to replace show_ldap_errors X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2dacb5cae501242730882fb3f7a7366b238c8bd1;p=gosa.git Added ldap error message to replace show_ldap_errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9465 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index c01428d42..af6fec7a3 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -694,6 +694,13 @@ class LDAP{ return ($error); } + + function success() + { + return (preg_match('/Success/i', $this->error)); + } + + function get_error() { if ($this->error == 'Success'){ diff --git a/gosa-core/include/utils/class_msgPool.inc b/gosa-core/include/utils/class_msgPool.inc index 0286f9591..7b55aee9f 100644 --- a/gosa-core/include/utils/class_msgPool.inc +++ b/gosa-core/include/utils/class_msgPool.inc @@ -1,4 +1,10 @@ _("read operation"), _("add operation"), _("modify operation"), + _("delete operation"), _("search operation"), _("authentication")); + + if (isset($typemap[$type])){ + $headline= sprintf(_("LDAP %s failed!"), $typemap[$type]); + } else { + $headline= _("LDAP operation failed!"); + } + + /* Fill DN information */ + if ($dn != ""){ + $dn_info= "

"._("Object").": ".LDAP::fix($dn); + } + + return $headline.$dn_info."

"._("Error").": ".$error; + } + + } + +?>