From 261335b96c70456333991ea1f05011d295ea18c8 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 21 Jun 2006 10:36:42 +0000 Subject: [PATCH] Updated ntp server selection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3857 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_terminalGeneric.inc | 11 ++++++++--- plugins/admin/systems/class_workstationGeneric.inc | 9 ++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 7f07d2e8e..164c7db8f 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -282,11 +282,16 @@ class termgeneric extends plugin } $smarty->assign("nfsservers", $tmp2); + $smarty->assign("syslogservers", $this->gotoSyslogServers); + $tmp = array(); + foreach($this->gotoNtpServers as $server){ + if(!in_array($server,$this->gotoNtpServer)){ + $tmp[$server] = $server; + } + } - - $smarty->assign("syslogservers", $this->gotoSyslogServers); - $smarty->assign("ntpservers", $this->gotoNtpServers); + $smarty->assign("ntpservers", $tmp); /* Variables */ foreach(array("base", "gotoMode", "gotoTerminalPath", "gotoSwapServer", diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 464070e6d..c40c6f125 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -228,7 +228,14 @@ class workgeneric extends plugin $smarty->assign("l", $this->l); $smarty->assign("bases", $this->config->idepartments); $smarty->assign("staticAddress", ""); - $smarty->assign("gotoNtpServers",$this->gotoNtpServers); + + $tmp = array(); + foreach($this->gotoNtpServers as $server){ + if(!in_array($server,$this->gotoNtpServer)){ + $tmp[$server] = $server; + } + } + $smarty->assign("gotoNtpServers",$tmp); /* Check if workstation is online */ $query= "fping -q -r 1 -t 500 ".$this->cn; -- 2.30.2