From: hickert Date: Thu, 18 May 2006 07:50:42 +0000 (+0000) Subject: Fixed Terminal NTPserver .... syslogserver default to inherited X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=db0f5feb79d9c4e9858959cd2caa830792d4aa4b;p=gosa.git Fixed Terminal NTPserver .... syslogserver default to inherited git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3410 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 3e16aabb1..812b4f90f 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -12,6 +12,7 @@ class termgeneric extends plugin var $gotoTerminalPath= ""; var $gotoSwapServer= ""; var $gotoSyslogServer= ""; + var $gotoSyslogServers = array(); var $gotoNtpServer= array(); var $gotoNtpServers= array(); var $gotoSndModule= ""; @@ -71,7 +72,7 @@ class termgeneric 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(); } @@ -96,6 +97,16 @@ class termgeneric extends plugin $this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn); } + /* Create an array of all Syslog servers */ + $tmp = $this->config->data['SERVERS']['SYSLOG']; + foreach($tmp as $server){ + $visible = $server; + if($server == "default") { + $visible = "["._("inherited")."]"; + } + $this->gotoSyslogServers[$server] = $visible; + } + $this->orig_dn= $this->dn; } @@ -237,7 +248,10 @@ class termgeneric extends plugin } $smarty->assign("nfsservers", $tmp2); - $smarty->assign("syslogservers", $this->config->data['SERVERS']['SYSLOG']); + + + + $smarty->assign("syslogservers", $this->gotoSyslogServers); $smarty->assign("ntpservers", $this->gotoNtpServers); /* Variables */ @@ -385,7 +399,7 @@ class termgeneric extends plugin } if($this->inheritTimeServer){ - $this->attrs['gotoNtpServer'] = "default"; + $this->attrs['gotoNtpServer'] = array(); }else{ /* Set ntpServers */ $this->attrs['gotoNtpServer'] = array(); diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 4ac24ca17..37fdfc923 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -10,6 +10,7 @@ class workgeneric extends plugin /* Generic terminal attributes */ var $gotoMode= "locked"; var $gotoSyslogServer= ""; + var $gotoSyslogServers= array(); var $gotoNtpServer= array(); var $gotoNtpServers= array(); var $gotoSndModule= ""; @@ -101,6 +102,16 @@ class workgeneric extends plugin $this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn); } + /* Create an array of all Syslog servers */ + $tmp = $this->config->data['SERVERS']['SYSLOG']; + foreach($tmp as $server){ + $visible = $server; + if($server == "default") { + $visible = "["._("inherited")."]"; + } + $this->gotoSyslogServers[$server] = $visible; + } + /* Save 'dn' for later referal */ $this->orig_dn= $this->dn; } @@ -200,7 +211,7 @@ class workgeneric extends plugin /* Arrays */ $smarty->assign("modes", $this->modes); $smarty->assign("nfsservers", $this->config->data['SERVERS']['NFS']); - $smarty->assign("syslogservers", $this->config->data['SERVERS']['SYSLOG']); + $smarty->assign("syslogservers", $this->gotoSyslogServers); $smarty->assign("ntpservers", $this->config->data['SERVERS']['NTP']); /* Variables */ diff --git a/plugins/admin/systems/terminal.tpl b/plugins/admin/systems/terminal.tpl index 607c5907c..8485c9862 100644 --- a/plugins/admin/systems/terminal.tpl +++ b/plugins/admin/systems/terminal.tpl @@ -37,7 +37,7 @@ diff --git a/plugins/admin/systems/workstation.tpl b/plugins/admin/systems/workstation.tpl index 1a47d67d7..a320b0dd2 100644 --- a/plugins/admin/systems/workstation.tpl +++ b/plugins/admin/systems/workstation.tpl @@ -43,7 +43,7 @@