From: hickert Date: Thu, 18 May 2006 06:55:44 +0000 (+0000) Subject: Fixed saving of gotoNtpServer X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=06ab33231fc087517b18962adb963254dc36749c;p=gosa.git Fixed saving of gotoNtpServer git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3403 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 1bb728ace..4ac24ca17 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -75,17 +75,17 @@ class workgeneric extends plugin } /* Set inherit checkbox state */ - if(in_array("default",$this->gotoNtpServer)){ + if((in_array("default",$this->gotoNtpServer)) || (count($this->gotoNtpServer) == 0)){ $this->inheritTimeServer = true; $this->gotoNtpServer=array(); } /* Create available ntp options */ - $this->gotoNtpServers = $this->config->data['SERVERS']['NTP']; - foreach($this->gotoNtpServers as $key => $server){ - if($server == "default"){ - unset($this->gotoNtpServers[$key]); - } + $tmp = $this->config->data['SERVERS']['NTP']; + $this->gotoNtpServers = array(); + foreach($tmp as $key => $server){ + if($server == "default") continue; + $this->gotoNtpServers[$server] = $server; } $this->modes["active"]= _("Activated"); @@ -342,7 +342,7 @@ class workgeneric extends plugin /* Update ntp server settings */ if($this->inheritTimeServer){ - $this->attrs['gotoNtpServer'] = "default"; + $this->attrs['gotoNtpServer'] = array(); }else{ /* Set ntpServers */ $this->attrs['gotoNtpServer'] = array(); diff --git a/plugins/admin/systems/workstation.tpl b/plugins/admin/systems/workstation.tpl index 4a1ac0e69..1a47d67d7 100644 --- a/plugins/admin/systems/workstation.tpl +++ b/plugins/admin/systems/workstation.tpl @@ -69,7 +69,7 @@