diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index cd714dea21497752554b28944c89ce00f7ec7890..37fdfc923bd08d1fe1b30a84dc60ef8a37f73a46 100644 (file)
/* Generic terminal attributes */
var $gotoMode= "locked";
var $gotoSyslogServer= "";
+ var $gotoSyslogServers= array();
var $gotoNtpServer= array();
var $gotoNtpServers= array();
var $gotoSndModule= "";
var $ghGfxAdapter= "-";
var $ghSoundAdapter= "-";
var $gotoLastUser= "-";
- var $FAIscript="";
+ var $FAIscript= "";
var $didAction= FALSE;
+ var $FAIstate= "";
/* Needed values and lists */
var $base= "";
}
/* 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();
}
/* Create available ntp options */
- $this->gotoNtpServers = $this->config->data['SERVERS']['NTP'];
- foreach($this->gotoNtpServers as $key => $server){
- if($server == "default"){
- unset($this->gotoNtpServers[$key]);
- }
+ $tmp = $this->config->data['SERVERS']['NTP'];
+ $this->gotoNtpServers = array();
+ foreach($tmp as $key => $server){
+ if($server == "default") continue;
+ $this->gotoNtpServers[$server] = $server;
}
$this->modes["active"]= _("Activated");
$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;
}
/* 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 */
$this->netConfigDNS->remove_from_parent();
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing workstation failed"));
/* Optionally execute a command after we're done */
- $this->handle_post_events("remove", array("macAddress", $this->netConfigDNS->macAddress));
+ $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress));
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
/* Update ntp server settings */
if($this->inheritTimeServer){
- $this->attrs['gotoNtpServer'] = "default";
+ $this->attrs['gotoNtpServer'] = array();
}else{
/* Set ntpServers */
$this->attrs['gotoNtpServer'] = array();
}
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
if(!$this->didAction){
$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 workstation failed"));
}
}