index 5c036d1965b74e0191bd0ca2d0b0bb5636bc9343..7768f2563998017301e02eb4e41fc2663ae54574 100644 (file)
<?php
-require_once("class_goService.inc");
-
class servkolab extends goService {
/* CLI vars */
var $cli_summary = "Manage server basic objects";
var $kolabFreeBusyFuture = "1";
var $k = "kolab";
var $cyrus_imap = "TRUE";
- var $cyrus_pop3 = "TRUE";
+ var $cyrus_pop3 = "FALSE";
var $cyrus_imaps = "TRUE";
var $cyrus_pop3s = "TRUE";
var $cyrus_sieve = "TRUE";
var $apache_allow_unauthenticated_fb = "TRUE";
- var $proftpd_ftp = "TRUE";
+ var $proftpd_ftp = "FALSE";
var $apache_http = "TRUE";
var $kolabHost = array();
var $orig_cn = "";
+ var $view_logged = FALSE;
var $attributes = array("postfix_mydomain", "postfix_mydestination", "proftpd_ftp", "k",
"postfix_mynetworks", "postfix_enable_virus_scan", "postfix_relayhost", "apache_http",
var $DisplayName = "Kolab mail service";
var $StatusFlag = "";
- function servkolab($config, $dn = NULL, $parent= NULL)
+ function servkolab(&$config, $dn = NULL, $parent= NULL)
{
/* Setting the hostname and tell this Plugin that we are the kolab extension*/
$this->hostname = preg_replace('/^cn=([^,]+),.*$/', '\1', $dn);
$this->initially_was_account = true;
}
}
-
}
/* Call parent execute */
plugin::execute();
+ if($this->is_account && !$this->view_logged){
+ $this->view_logged = TRUE;
+ new log("view","server/".get_class($this),$this->dn);
+ }
+
/***************
Variable initialisation
***************/
return;
}
- /* Integration check, not translatet because they can't pop up at all, only for debug */
+ /* Integration check, not translated because they can't pop up at all, only for debug */
if(count($this->kolabHost) == 0){
print_red("Server - Kolab tab : This is not possible, we can't remove an account which doesn't exists.");
return;
/* Remove complete entry */
$ldap->rmdir ($this->dn);
show_ldap_error($ldap->get_error(), sprintf(_("Removing host entry from system server/kolab with dn '%s' failed."),$this->dn));
- gosa_log("k=kolab entry removed, ".$this->hostname." was the last kolabHost entry.");
-
} else {
/* Only modify kolabHost */
$this->cleanup();
$ldap->modify ($attrs);
show_ldap_error($ldap->get_error(), sprintf(_("Removing host entry from system server/kolab with dn '%s' failed."),$this->dn));
- gosa_log("Removing ".$this->hostname." from list of kolabHosts");
}
+ new 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");
}
$ldap->cd($this->dn);
$this->cleanup();;
$ldap->$mode($this->attrs);
+
+ if($mode == "add"){
+ new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ new 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 */