Code

Updated ntp server selection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Jun 2006 10:36:42 +0000 (10:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Jun 2006 10:36:42 +0000 (10:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3857 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_terminalGeneric.inc
plugins/admin/systems/class_workstationGeneric.inc

index 7f07d2e8ea1d5fc612fecd3b35f5572d1f595a54..164c7db8f58aad0ee5b81765944d7af2e4aef383 100644 (file)
@@ -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",
index 464070e6d16569df9e062496fe6d1daf129af9ab..c40c6f1254198c671d33787bc77ab3d0b25452c1 100644 (file)
@@ -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;