From 06ab33231fc087517b18962adb963254dc36749c Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 18 May 2006 06:55:44 +0000 Subject: [PATCH] Fixed saving of gotoNtpServer git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3403 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_workstationGeneric.inc | 14 +++++++------- plugins/admin/systems/workstation.tpl | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) 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 @@
-- 2.30.2