Code

Added additional information to the extended error message
[gosa.git] / include / class_ldap.inc
index 94ae4c9244c550832c26e33ae3a45fb2dd118cd5..a1f960aa3bc730f67939ee52a170f3530ec83e84 100644 (file)
@@ -760,7 +760,12 @@ class LDAP{
     if ($this->error == 'Success'){
       return $this->error;
     } else {
-      $error= $this->error." (".$this->get_additional_error().")";
+      $adderror= $this->get_additional_error();
+      if ($adderror != ""){
+        $error= $this->error." (".$this->get_additional_error().", ".sprintf(_("while operating on '%s' using LDAP server '%s'"), $this->base, $this->hostname).")";
+      } else {
+        $error= $this->error." (".sprintf(_("while operating on LDAP server %s"), $this->hostname).")";
+      }
       return $error;
     }
   }