Code

Added some logging
[gosa.git] / plugins / admin / fai / class_faiTemplate.inc
index 83d556da9e6dcd4bb35f1892e8cd9dc24ea57071..8de436e3a7a23ad1b1d037305a8b40c6a43ccf8f 100644 (file)
@@ -82,6 +82,8 @@ class faiTemplate 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();
   }
@@ -371,6 +373,7 @@ class faiTemplate extends plugin
     }
 
     prepare_to_save_FAI_object($use_dn,array(),true);
+    @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
 
     foreach($this->SubObjects as $name => $obj){
 #      $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']);
@@ -414,6 +417,12 @@ class faiTemplate extends plugin
     prepare_to_save_FAI_object($this->dn,$this->attrs);
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/template 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();