diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc
index dbfc1401dd323b3fb2673d3cf160651526484451..f7a9ea42ea0f881685aab9fed452154794fdd9c3 100644 (file)
/* This plugin only writes its objectClass */
var $objectclasses = array("goNtpServer");
- var $attributes = array("goTimeSource","goNtpServerStatus");
+ var $attributes = array("goTimeSource");
var $StatusFlag = "goNtpServerStatus";
/* This class can't be assigned twice so it conflicts with itsself */
function getListEntry()
{
+ $this->updateStatusState();
$flag = $this->StatusFlag;
$fields['Status'] = $this->$flag;
$fields['Message'] = _("NTP service");
}
}
+
+ /* 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 check(){ return array();}
function save_object(){;}