diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc
index 694f6e6943b0fef8456b358da14530863d599ee8..b7577f202c4af287ff917fcbec2a38cd6d9b611e 100644 (file)
function goNtpServer($config,$dn)
{
plugin::plugin($config,$dn);
- $this->DisplayName = _("NTP Service");
+ $this->DisplayName = _("Time service");
/* Load arrays */
$tmp = array();
}
/* Deleting an Entry, is a bit more complicated than adding one*/
- if(isset($_POST['DelNTPEnt'])) {
+ if((isset($_POST['DelNTPEnt'])) && (isset($_POST['goTimeSource']))) {
foreach ($_POST['goTimeSource'] as $entry){
if (isset($this->goTimeSource[$entry])){
unset($this->goTimeSource[$entry]);
$fields['Message'] = _("NTP service");
$fields['AllowStart'] = true;
$fields['AllowStop'] = true;
- $fields['AllowReset'] = true;
+ $fields['AllowRestart'] = true;
$fields['AllowRemove']= true;
$fields['AllowEdit'] = true;
return($fields);
function setStatus($value)
{
if($value == "none") return;
+ if(!$this->initially_was_account) return;
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->dn);
$ldap->cat($this->dn,array("objectClass"));
-
if($ldap->count()){
- $attrs =array();
+
$tmp = $ldap->fetch();
for($i = 0; $i < $tmp['objectClass']['count']; $i ++){
$attrs['objectClass'][] = $tmp['objectClass'][$i];
- }
- if(!in_array("goNtpServer",$attrs['objectClass'])){
- $attrs['objectClass'][] = "goNtpServer";
}
-
$flag = $this->StatusFlag;
$attrs[$flag] = $value;
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
- }
+ }
}
-
+
+
function check(){ return array();}
function save_object(){;}