Code

Added toggling of remove flag for packages
[gosa.git] / plugins / admin / fai / class_faiVariable.inc
index e49419096ec94de4bcd165ccc6e5f495c1fb99cf..1c596cb50dd73d913a81b31be0722c74106bacb5 100644 (file)
@@ -282,7 +282,7 @@ class faiVariable extends plugin
       /* Write FAIscript to ldap*/
       $ldap->cd($this->dn);
       $this->cleanup();
-$ldap->modify ($this->attrs); 
+      $ldap->modify ($this->attrs); 
 
     }else{
       /* Write FAIscript to ldap*/
@@ -291,11 +291,10 @@ $ldap->modify ($this->attrs);
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
     }
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Saving FAI variable base failed"));
  
     /* Do object tagging */
     $this->handle_object_tagging();
-    show_ldap_error($ldap->get_error());
  
     /* Prepare FAIscriptEntry to write it to ldap
      * First sort array.
@@ -354,12 +353,14 @@ $ldap->modify ($this->attrs);
         $ldap->cd($sub_dn);
         $ldap->rmdir_recursive($sub_dn);
         $this->handle_post_events("remove");
+        show_ldap_error($ldap->get_error(), _("Removing FAI variable failed")); 
       }elseif($obj['status'] == "edited"){
         $ldap->cd($sub_dn);
         $this->cleanup();
-$ldap->modify ($tmp); 
+        $ldap->modify ($tmp); 
 
         $this->handle_post_events("modify");
+        show_ldap_error($ldap->get_error(), _("Saving FAI variable failed")); 
       }elseif($obj['status']=="new"){
 
         if($tmp['description'] == array()){
@@ -371,11 +372,10 @@ $ldap->modify ($tmp);
         $ldap->cd($sub_dn);
         $ldap->add($tmp); 
         $this->handle_post_events("add");
+        show_ldap_error($ldap->get_error(), _("Saving FAI variable failed")); 
       }
-      show_ldap_error($ldap->get_error()); 
 
       $this->handle_object_tagging($sub_dn, $this->gosaUnitTag);
-      show_ldap_error($ldap->get_error()); 
     }
   }
 }