Code

Fixed logging
[gosa.git] / plugins / admin / systems / class_servDNS.inc
index c32ac192d20f3fa87a1867d16f2f6005d8779e8f..485eede2bd72ca312814574787f729ac4ad70cef 100644 (file)
@@ -26,6 +26,7 @@ class servdns extends goService
   var $conflicts        = array("servdns");
   var $DisplayName      = "";
   var $StatusFlag       = "";
+  var $view_logged      = FALSE;
 
   function servdns ($config, $dn= NULL, $parent= NULL)
   {
@@ -50,11 +51,6 @@ class servdns extends goService
     }else{
       $this->is_account = true;
     }
-  
-    if($this->is_account){
-      @log::log("view","unknown/".get_class($this),$this->dn);
-    }
-
     $this->initially_was_account = $this->is_account;
   }
 
@@ -65,6 +61,11 @@ class servdns extends goService
      */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     /* Fill templating stuff 
      */
     $smarty= get_smarty();