Code

Updated workstation - Startup
[gosa.git] / plugins / admin / systems / class_goVirusServer.inc
index 2cc0a1b1a83de33e6686ffa7f35d9aa827bc56b7..0d7cd71592009a3ba93853ef95f56b7c562132cd 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-require_once("class_goService.inc");
-
 class govirusserver extends goService{
        
   /* This plugin only writes its objectClass */
@@ -18,7 +16,6 @@ class govirusserver extends goService{
   var $cn               = "";
   var $avStatus         = "";
 
-  var $dialog           = NULL;
   var $ui               = NULL;
 
   var $Flags            = array("D","S","A","E");
@@ -39,11 +36,12 @@ class govirusserver extends goService{
   var $avUser                       = "";
   var $avHttpProxyURL               = "";
   var $avDatabaseMirror             = "";
+  var $view_logged  =FALSE;
 
-  function govirusserver($config,$dn, $parent= NULL)
+  function govirusserver(&$config,$dn, $parent= NULL)
   {
     /* Init class */
-    plugin::plugin($config,$dn, $parent);
+    goService::goService($config,$dn, $parent);
     $this->DisplayName = _("Anti virus");
 
     /* Get userinfo & acls */
@@ -63,6 +61,12 @@ class govirusserver extends goService{
   {
     $smarty = get_smarty(); 
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      new log("view","server/".get_class($this),$this->dn);
+    }
+
+
     /* Set acls */
     $tmp = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation) { 
@@ -140,8 +144,10 @@ class govirusserver extends goService{
     }
     if($this->initially_was_account){
       $this->handle_post_events("modify");
+      new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }else{
       $this->handle_post_events("add");
+      new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }
 
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/anti virus with dn '%s' failed."),$this->dn));