Code

Fixed logging
[gosa.git] / plugins / admin / systems / class_workstationService.inc
index 1eed7b90681e43171b52786b2e915a6f5300652d..370253fbe66bc39092295d892b797849a8dc2c05 100644 (file)
@@ -24,6 +24,7 @@ class workservice extends plugin
   var $gotoScannerClients= "";
   var $gotoScannerBackend= "";
   var $goFonHardware= "automatic";
+  var $view_logged = FALSE;
 
   /* Needed values and lists */
   var $ignore_account= TRUE;
@@ -234,10 +235,6 @@ class workservice extends plugin
       $this->MouseTypes= array('AUTO' => _("inherited"));
       $this->MousePorts= array('AUTO' => _("inherited"));
     }
-
-    if($this->is_account){
-      @log::log("view","workstation/".get_class($this),$this->dn);
-    }
   }
 
   function execute()
@@ -245,6 +242,11 @@ class workservice extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","workstation/".get_class($this),$this->dn);
+    }
+
     /* Do we need to flip is_account state? */
     if (isset($_POST['modify_state'])){
       $this->is_account= !$this->is_account;