Code

Added some logging
[gosa.git] / plugins / admin / fai / class_faiProfile.inc
index a4ae413562f04e0afe9b4f7bc8378870cb8e5b3e..52d87d9e46b39fad47069c1660e55998b17f9e18 100644 (file)
@@ -100,6 +100,7 @@ class faiProfile extends plugin
 
     if($dn != "new"){
       $this->dn =$dn;
+      @log::log("view","fai/".get_class($this),$this->dn);
     }
     $this->old_cn   = $this->cn;
   }
@@ -369,6 +370,7 @@ class faiProfile extends plugin
       $use_dn = $this->dn;
     }
 
+    @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
     prepare_to_save_FAI_object($use_dn,array(),true);
     $this->handle_post_events("remove");    
   }
@@ -427,7 +429,13 @@ class faiProfile extends plugin
     $this->attrs['FAIclass']=trim($this->FAIclass);
 
     prepare_to_save_FAI_object($this->dn,$this->attrs);
-    
+   
+    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);
+    }
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/profile with dn '%s' failed."),$this->dn));
 
     /* Do object tagging */
@@ -444,7 +452,7 @@ class faiProfile extends plugin
           "plDescription" => _("FAI profile"),
           "plSelfModify"  => FALSE,
           "plDepends"     => array(),
-          "plPriority"    => 28,
+          "plPriority"    => 30,
           "plSection"     => array("administration"),
           "plCategory"    => array("fai"),
           "plProvidedAcls" => array(