Code

Removed duplicated post call
[gosa.git] / plugins / admin / systems / class_terminalStartup.inc
index ddf9c48365170d707b3627aef5716d7a449d658c..dfae3014777783a594ef3e81bd8ba5dee3f04ce4 100644 (file)
@@ -24,7 +24,7 @@ class termstartup extends plugin
 
 
   /* attribute list for save action */
-  var $attributes= array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters");
+  var $attributes= array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters","gotoModules");
   var $objectclasses= array("GOhard");
 
   /* Helper */
@@ -40,6 +40,7 @@ class termstartup extends plugin
 
     /* Get arrays */
     foreach (array("gotoModules") as $val){
+      $this->$val = array();
       if (isset($this->attrs["$val"]["count"])){
         for ($i= 0; $i<$this->attrs["count"]; $i++){
           if (isset($this->attrs["$val"][$i])){
@@ -143,6 +144,10 @@ class termstartup extends plugin
         }
       }
     }
+
+    if($this->is_account){
+      @log::log("view","terminal/".get_class($this),$this->dn);
+    }
   }
 
   function execute()
@@ -288,6 +293,7 @@ class termstartup extends plugin
   {
     if($this->acl_is_removeable()){
       $this->handle_post_events("remove");
+      @log::log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs));
     }
   }
 
@@ -393,9 +399,12 @@ class termstartup extends plugin
     /* Write back to ldap */
     $ldap= $this->config->get_ldap_link();
     $ldap->cd($this->dn);
+    
     $this->cleanup();
     $ldap->modify ($this->attrs); 
 
+    @log::log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of system terminal/startup with dn '%s' failed."),$this->dn));
     $this->handle_post_events("modify");
   }