diff --git a/plugins/admin/systems/class_goMailServer.inc b/plugins/admin/systems/class_goMailServer.inc
index 1c0cdc17dbaf30daf0acfe6006fcd587c4a7063b..d8e1985691c04af3e6390bb986f1d70200c6988a 100644 (file)
var $objectclasses = array("goMailServer");
/* This class can't be assigned twice so it conflicts with itsself */
- var $conflicts = array("goMailServer");
-
var $DisplayName = "";
var $dn = NULL;
var $StatusFlag = "goMailServerStatus";
- var $attributes = array("goMailServerStatus","description","postfixHeaderSizeLimit",
+ var $attributes = array("description","postfixHeaderSizeLimit",
"postfixMailboxSizeLimit","postfixMessageSizeLimit",
"postfixMyDestinations","postfixMyDomain","postfixMyhostname",
"postfixMyNetworks","postfixRelayhost","postfixTransportTable",
var $TransportProtocols = array();
var $Actions = array();
var $cn = "";
+ var $conflicts = array("goMailServer","kolab");
function goMailServer($config,$dn)
{
/* Return list entry */
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("Postfix")." ["._("configured for")." ".$this->postfixMyhostname."] ";
}
}
+
+ /* Get updates for status flag */
+ function updateStatusState()
+ {
+ if(empty($this->StatusFlag)) return;
+
+ $attrs = array();
+ $flag = $this->StatusFlag;
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->cn);
+ $ldap->cat($this->dn,array($flag));
+ if($ldap->count()){
+ $attrs = $ldap->fetch();
+ }
+ if(isset($attrs[$flag][0])){
+ $this->$flag = $attrs[$flag][0];
+ }
+ }
+
function save_object()
{
plugin::save_object();