From: hickert Date: Thu, 27 Apr 2006 11:28:40 +0000 (+0000) Subject: Fixed saving X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=66caece46c01470381d64c9ff7720a0c5311b594;p=gosa.git Fixed saving git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3146 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 35b001d34..e7c8fe4b4 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -58,7 +58,7 @@ class termgeneric extends plugin } /* Create used ntp server array */ - $this->gotoNtpServer= array(); + $this->gotoNtpServer= array("default"=>"default"); if(isset($this->attrs['gotoNtpServer'])){ unset($this->attrs['gotoNtpServer']['count']); foreach($this->attrs['gotoNtpServer'] as $server){ @@ -163,14 +163,18 @@ class termgeneric extends plugin return($display); } + /* Add new ntp Server to our list */ if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers']))){ $this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers']; } + /* Delete selected NtpServer for list of used servers */ if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected']))){ foreach($_POST['gotoNtpServerSelected'] as $name){ unset($this->gotoNtpServer[$name]); } + + /* if nothing is selected, add default */ if(count($this->gotoNtpServer) == 0){ $this->gotoNtpServer['default'] = "default"; } @@ -352,6 +356,12 @@ class termgeneric extends plugin $this->attrs= $attrs; } + /* Set ntpServers */ + $this->attrs['gotoNtpServer'] = array(); + foreach($this->gotoNtpServer as $server){ + $this->attrs['gotoNtpServer'][] = $server; + } + /* Write back to ldap */ $ldap= $this->config->get_ldap_link(); if ($this->orig_dn == 'new'){