Code

Added printer patch
[gosa.git] / plugins / admin / systems / class_servDB.inc
index de62146352b771630dc1d21bb810415ef51eea58..cd716eaf154f6fa6c5743d3fb60c9c8b83dd83f4 100644 (file)
@@ -127,7 +127,8 @@ class servdb extends plugin
   /* Check supplied data */
   function check()
   {
-    $message= array();
+    /* Call common method to give check the hook */
+    $message= plugin::check();
 
     if(in_array("goGlpiServer",$this->objectclasses)){
       foreach(array("goGlpiAdmin","goGlpiDatabase") as $attr){
@@ -238,13 +239,15 @@ class servdb extends plugin
     /* Write to LDAP */
     $ldap= $this->config->get_ldap_link();
     $ldap->cd($this->dn);
-    $ldap->modify($this->attrs);
-    show_ldap_error($ldap->get_error());
+    $this->cleanup();
+    $ldap->modify ($this->attrs); 
+
+    show_ldap_error($ldap->get_error(), _("Saving server db settings failed"));
 
     /* Optionally execute a command after we're done */
     if ($this->initially_was_account == $this->is_account){
       if ($this->is_modified){
-        $this->handle_post_events("mofify");
+        $this->handle_post_events("modify");
       }
     } else {
       $this->handle_post_events("add");