Code

Updated logging
[gosa.git] / plugins / admin / systems / class_workstationStartup.inc
index 3c587552768ecf594a36000acaafaf6775eed7c2..4ce45768e3d2617db56bcf23390eeb6bac7d8b23 100644 (file)
@@ -42,7 +42,7 @@ class workstartup extends plugin
   var $FAIdebianMirror    = "auto";
 
   var $unresolved_classes = array();
-
+  var $view_logged        = FALSE;
   
   /* FAI class selection */
   var $InheritedFAIclass           = array();
@@ -488,6 +488,11 @@ class workstartup extends plugin
        /* Call parent execute */
        plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","workstation/".get_class($this),$this->dn);
+    }
+
     /* Do we need to flip is_account state? */
     if(isset($_POST['modify_state'])){
       if($this->is_account && $this->acl_is_removeable()){
@@ -805,6 +810,7 @@ class workstartup extends plugin
   function remove_from_parent()
   {
     $this->handle_post_events("remove");
+    @log::log("remove","workstation/".get_class($this),$this->dn);
   }
 
   function generateDNSyn($release)
@@ -1086,6 +1092,7 @@ class workstartup extends plugin
 
     $this->cleanup();
     $ldap->modify ($this->attrs); 
+    @log::log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
 
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/startup with dn '%s' failed."),$this->dn));
     $this->handle_post_events("modify");