Code

Added Logging for some services
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 May 2007 07:12:45 +0000 (07:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 May 2007 07:12:45 +0000 (07:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6376 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_goCupsServer.inc
plugins/admin/systems/class_goFaxServer.inc
plugins/admin/systems/class_goGlpiServer.inc
plugins/admin/systems/class_goService.inc

index 5d7ad0f64bdd12d319aca16ac1ee9401be595f4c..62a15a9f3972be266e5b1c9ab6b2384f1de81586 100644 (file)
@@ -24,10 +24,11 @@ class goCupsServer extends goService{
  
   function goCupsServer($config,$dn)
   {
-    plugin::plugin($config,$dn);
+    goService::goService($config,$dn);
     $this->DisplayName = _("Print service");
   }
 
+    
   function execute()
   { 
     $smarty = get_smarty(); 
index 1a9347154aaeb2eb5567fa17fd7b25cc527d6d5b..f5628c10845a98ca040b181556832ca8489c9a51 100644 (file)
@@ -27,7 +27,7 @@ class goFaxServer extends goService {
  
   function goFaxServer($config,$dn)
   {
-    plugin::plugin($config,$dn);
+    goService::goService($config,$dn);
     $this->DisplayName = _("FAX database");
   }
 
index 5851b8f015bcf69fd0c21892ed27f68769a28bf3..152ed03d33d051f1d641fdbc9df79dea669461c9 100644 (file)
@@ -29,7 +29,7 @@ class goGlpiServer extends goService {
  
   function goGlpiServer($config,$dn)
   {
-    plugin::plugin($config,$dn);
+    goService::goService($config,$dn);
     $this->DisplayName = _("Inventory database");
   }
 
index e4f629f8588dfb8cdc0ce309a86a39c322d40464..515be0eb8a3e7a3c7acca89b29a9910d6ef827e0 100644 (file)
@@ -23,6 +23,10 @@ class goService extends plugin{
   {
     plugin::plugin($config,$dn);
     $this->DisplayName = _("Empty service");
+
+    if($this->is_account){
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
   }
 
   
@@ -88,7 +92,11 @@ class goService extends plugin{
     }else{
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
+      
     }
+
+    @log::log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
     show_ldap_error($ldap->get_error(), sprintf(_("Removing of server services/".get_class($this)." - (".$this->DisplayName.") with dn '%s' failed."),$this->dn));
     $this->handle_post_events("remove");
   }
@@ -104,9 +112,11 @@ class goService extends plugin{
     if($ldap->count()){
       $ldap->cd($this->dn);
       $ldap->modify($this->attrs);
+      @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }else{
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
+      @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }
     if($this->initially_was_account){
       $this->handle_post_events("modify");