diff --git a/plugins/admin/systems/class_goFaxServer.inc b/plugins/admin/systems/class_goFaxServer.inc
index 55a76a56a2bef7bf54f17146d93e5b4b1fee0270..53e8ad3076cd137ffb72aac8e646cb5d0d84c3cf 100644 (file)
/* This plugin only writes its objectClass */
var $objectclasses = array("goFaxServer");
- var $attributes = array("goFaxServerStatus","goFaxAdmin", "goFaxPassword");
+ var $attributes = array("goFaxAdmin", "goFaxPassword");
var $StatusFlag = "goFaxServerStatus";
/* This class can't be assigned twice so it conflicts with itsself */
var $goFaxAdmin = "";
var $goFaxPassword = "";
var $goFaxServerStatus = "";
- var $cn;
+ var $cn = "";
function goFaxServer($config,$dn)
{
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("FAX database configuration");
}
}
}
-
+
+ /* 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];
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>