Code

Fixed logging
[gosa.git] / plugins / admin / systems / class_servRepository.inc
index 740fdf0ea6a668b85825bcf73751db54c7b6ee25..27bb610f73c6c9257e7907199fc1c0a65c59c502 100644 (file)
@@ -26,7 +26,8 @@ class servrepository extends goService
   var $conflicts             = array("FAIrepositoryServer");
   var $DisplayName           = "";
   var $StatusFlag            = "";
-
+  
+  var $view_logged            = FALSE;
   var $fai_activated          = FALSE;
 
   function servrepository ($config, $dn= NULL, $parent= NULL)
@@ -83,10 +84,6 @@ class servrepository extends goService
         $this->repositories[$tmp[2]]=$tmp2;      
       }
     }
-
-    if($this->is_account){
-      @log::log("view","server/".get_class($this),$this->dn);
-    }
   }
 
   function execute()
@@ -94,6 +91,11 @@ class servrepository extends goService
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     if(!$this->fai_activated){
       $str = "<h2>"._("You can't use this plugin until FAI is activated.")."</h2>";
       return $str;