Code

Added logging
[gosa.git] / plugins / admin / groups / class_groupApplication.inc
index eb8363ae785f4869c2362bc69f4afe2e63fd3b04..b66f40e85ddb5c5ea2e86062735be8bc845e06d0 100644 (file)
@@ -156,6 +156,10 @@ class appgroup extends plugin
       $this->InitialFAIrelease  = $this->FAIrelease;
       $this->Releases           = $this->getReleases();
     }
+
+    if($this->is_account){
+      @log::log("view","groups/".get_class($this),$this->dn);
+    }
   }
 
 
@@ -912,7 +916,7 @@ class appgroup extends plugin
     $this->cleanup();
     
     $ldap->modify ($this->attrs); 
-
+    @log::log("remove","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error());
     show_ldap_error($ldap->get_error(), sprintf(_("Removing of groups/applications with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */
@@ -966,6 +970,12 @@ class appgroup extends plugin
     $this->cleanup();
     $ldap->modify ($this->attrs); 
 
+    if($this->initially_was_account){
+      @log::log("modify","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error());
+    }else{
+      @log::log("create","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error()); 
+    }   
+
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of groups/applications with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */
@@ -1158,6 +1168,14 @@ class appgroup extends plugin
   }
 
 
+  function PrepareForCopyPaste($source)
+  {
+    $this->FAIrelease = $this->InitialFAIrelease = $source->FAIrelease;
+    $this->gosaMemberApplication = $source->gosaMemberApplication;
+    $this->appoption = $source->appoption;
+  }
+
+
   /* Return plugin informations for acl handling  */ 
   function plInfo()
   {