Code

Removed duplicated post call
[gosa.git] / plugins / admin / systems / class_servKolab.inc
index 7ca2e1d700a49d6914bee9125b0570f68e24c76c..3b666fd43bbae9848f4ebb8cfcc630909d4d4c81 100644 (file)
@@ -9,6 +9,7 @@ class servkolab extends goService {
   var $cli_parameters = array("eins"=>"Eins ist toll", "zwei"=>"Zwei ist noch besser");
 
   var $postfix_mydomain                 = "";
+  var $cyrus_admins                     = "";
   var $postfix_mydestination            = "";
   var $postfix_mynetworks               = "127.0.0.1/8";
   var $postfix_enable_virus_scan        = "TRUE";
@@ -18,7 +19,6 @@ class servkolab extends goService {
   var $cyrus_quotawarn                  = "80";
   var $kolabFreeBusyFuture              = "1";
   var $k                                = "kolab";
-  var $cyrus_admins                     = "TRUE";
   var $cyrus_imap                       = "TRUE";
   var $cyrus_pop3                       = "TRUE";
   var $cyrus_imaps                      = "TRUE";
@@ -49,7 +49,7 @@ class servkolab extends goService {
     $this->dn       = "k=kolab,".$config->current['BASE'];
 
     /* Load variables, if given*/
-    plugin::plugin($config, $this->dn, $parent);
+    plugin::plugin($config, $this->dn);
 
     /* Copy needed attributes */
     foreach($this->attributes as $val) {
@@ -77,6 +77,9 @@ class servkolab extends goService {
       }
     } 
 
+    if($this->is_account){
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
   }
 
 
@@ -212,6 +215,8 @@ class servkolab extends goService {
       gosa_log("Removing ".$this->hostname." from list of kolabHosts");
     }
 
+    @log::log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
     /* Optionally execute a command after we're done */
     $this->handle_post_events("remove");
   }
@@ -231,7 +236,7 @@ class servkolab extends goService {
 
       /* Save checkboxes */
       foreach (array( "postfix_enable_virus_scan", "postfix_allow_unauthenticated",
-            "cyrus_admins", "cyrus_imap", "cyrus_pop3", "cyrus_imaps",
+            "cyrus_imap", "cyrus_pop3", "cyrus_imaps",
             "cyrus_pop3s", "cyrus_sieve", "apache_allow_unauthenticated_fb",
             "proftpd_ftp", "apache_http") as $cb){
 
@@ -345,6 +350,13 @@ class servkolab extends goService {
     $ldap->cd($this->dn);
     $this->cleanup();;
     $ldap->$mode($this->attrs);
+
+    if($mode == "add"){
+      @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+    }else{
+      @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+    }
+
     show_ldap_error($ldap->get_error(), sprintf(_("Saving system server/kolab with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */
@@ -382,6 +394,7 @@ class servkolab extends goService {
           "plProvidedAcls"=> array(
             "postfixmydomain"                => _("Postfix mydomain") ,
             "postfixmydestination"           => _("My destination") ,
+            "cyrusadmins"                    => _("Cyrus admins") ,
             "proftpdftp"                     => _("FTP FreeBusy service") ,
             "postfixmynetworks"              => _("SMTP privileged networks") ,
             "postfixenablevirusscan"         => _("Enable virus scan") ,