Code

Added some logging
[gosa.git] / plugins / admin / fai / class_faiScript.inc
index c130a568d6cba899f26716d82ed72edf824ce727..edb3a03c8f25c5a2dd521abfc325d9f6559ed1af 100644 (file)
@@ -84,6 +84,8 @@ class faiScript extends plugin
         $objects                = $this->get_object_attributes($objects,$this->subAttributes);
         $this->SubObjects[$objects['cn']] = $objects;
       }
+    
+      @log::log("view","fai/".get_class($this),$this->dn);
     }
     $this->ui = get_userinfo();
   }
@@ -383,7 +385,9 @@ class faiScript extends plugin
       if($_SESSION['faifilter']['branch'] == "main"){
         $use_dn = $this->dn;
       }
-    
+   
+      @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
       prepare_to_save_FAI_object($use_dn,array(),true);
       
       foreach($this->SubObjects as $name => $obj){
@@ -433,6 +437,12 @@ class faiScript extends plugin
     prepare_to_save_FAI_object($this->dn,$this->attrs);
     show_ldap_error($ldap->get_error(), sprintf(_("Creating of FAI/script with dn '%s' failed."),$this->dn));
 
+    if($this->initially_was_account){
+      @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+    }else{
+      @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+    }
+
     /* Do object tagging */
     $this->handle_object_tagging();