diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index c3a227a3297eb0725f571e1540a3ffe1dfaad21a..812b4f90f8ea6dd9a1d13e6f56c6ca9c5ce5d072 100644 (file)
var $gotoTerminalPath= "";
var $gotoSwapServer= "";
var $gotoSyslogServer= "";
var $gotoTerminalPath= "";
var $gotoSwapServer= "";
var $gotoSyslogServer= "";
+ var $gotoSyslogServers = array();
var $gotoNtpServer= array();
var $gotoNtpServers= array();
var $gotoSndModule= "";
var $gotoNtpServer= array();
var $gotoNtpServers= array();
var $gotoSndModule= "";
}
/* Set inherit checkbox state */
}
/* 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();
}
$this->inheritTimeServer = true;
$this->gotoNtpServer=array();
}
$this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn);
}
$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;
}
$this->orig_dn= $this->dn;
}
}
$smarty->assign("nfsservers", $tmp2);
}
$smarty->assign("nfsservers", $tmp2);
- $smarty->assign("syslogservers", $this->config->data['SERVERS']['SYSLOG']);
+
+
+
+ $smarty->assign("syslogservers", $this->gotoSyslogServers);
$smarty->assign("ntpservers", $this->gotoNtpServers);
/* Variables */
$smarty->assign("ntpservers", $this->gotoNtpServers);
/* Variables */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
- $ldap->cat($this->dn);
+ $ldap->cat($this->dn, array('dn'));
if($ldap->count()){
$this->netConfigDNS->remove_from_parent();
$ldap->rmDir($this->dn);
if($ldap->count()){
$this->netConfigDNS->remove_from_parent();
$ldap->rmDir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing terminal failed"));
/* Optionally execute a command after we're done */
$this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress));
/* Optionally execute a command after we're done */
$this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress));
}
if($this->inheritTimeServer){
}
if($this->inheritTimeServer){
- $this->attrs['gotoNtpServer'] = "default";
+ $this->attrs['gotoNtpServer'] = array();
}else{
/* Set ntpServers */
$this->attrs['gotoNtpServer'] = array();
}else{
/* Set ntpServers */
$this->attrs['gotoNtpServer'] = array();
}
$ldap->cd($this->dn);
$this->cleanup();
}
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
$this->handle_post_events("modify");
}
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
$this->handle_post_events("modify");
}
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving terminal failed"));
/* Optionally execute a command after we're done */
$this->postcreate();
/* Optionally execute a command after we're done */
$this->postcreate();