diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 9c12a77f64930f8e7e1a42c7044a9baa72ad73a2..f33fcae8f012307850614a0158dbb820a67efdbd 100644 (file)
/* Generic terminal attributes */
var $bootmode = "G";
- var $goLdapServerList = array("default");
- var $gotoBootKernel = "";
+ var $goLdapServerList = array();
+ var $gotoBootKernel = "default";
var $gotoKernelParameters = "";
- var $gotoLdapServer = "";
+ var $gotoLdapServer = "default";
var $gotoModules = array();
var $gotoAutoFs = array();
var $gotoFilesystem = array();
var $gotoTerminalPath = "";
var $FAIstatus = "";
- var $gotoBootKernels = array("default");
+ var $gotoBootKernels = array();
/* attribute list for save action */
var $attributes = array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters", "FAIclass", "FAIstatus", "gotoShare","FAIdebianMirror", "FAIrelease");
*/
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
-
+
+ $this->goLdapServerList = array("default" =>"["._("inherited")."]");
+
$_SESSION['getAvailableClassesForThisRelease_CACHE'] = array();
$_SESSION['getAvailableClassesForThisRelease_CACHED_CLASSES'] = array();
$this->orig_dn= $this->dn;
+ /* Handle inheritance value "default" */
+ $this->gotoBootKernels= array("%default%" => '['._("inherited").']');
+
/* Get list of boot kernels */
if (isset($this->config->data['TABS'])){
$command= search_config($this->config->data['TABS'], get_class($this), "KERNELS");
}
}
pclose($fh);
- sort($this->gotoBootKernels);
+ ksort($this->gotoBootKernels);
}
}
+
}
/* Create divSelectBox for ldap server selection
*/
$SelectBoxLdapServer = new divSelectBox("LdapServer");
- $SelectBoxLdapServer->SetHeight(80);
+ $SelectBoxLdapServer->SetHeight(130);
/* Set first entry as selected, if $this->gotoLdapServer is empty
* or given entry is no longer available ...
$use = " checked ";
};
+ if($server == "default"){
+ $display = "["._("inherited")."]";
+ }else{
+ $display = $server;
+ }
+
$SelectBoxLdapServer->AddEntry(
array(
- array("string"=>$server),
+ array("string"=>$display),
array("string"=>"<input type='radio' name='gotoLdapServer' value='".$server."' ".$use.">",
"attach"=>"style='border-right:0px;'")
));
* if we are currently editing from ogroup menu we use (array("gotWorkstationTemplate","GOhard", "FAIobject"))
*/
if(isset($this->parent->by_object['ogroup'])){
- $this->objectclasses = array("gotoWorkstationTemplate","GOhard", "FAIobject");
+ $this->objectclasses = array("gotoWorkstationTemplate", "FAIobject");
}elseif(isset($this->parent->by_object['workgeneric'])){
$this->objectclasses = array("GOhard", "FAIobject");
+ }elseif(isset($this->parent->by_object['servgeneric'])){
+ $this->objectclasses = array("GOhard", "FAIobject");
}else{
print "Object Type Configuration : unknown";
exit();
$tmp= preg_replace ("/^[^,]+,/", "", $tmp);
$ldap->cat("cn=default,ou=terminals,ou=systems,$tmp".
- $this->config->current['BASE']);
+ $this->config->current['BASE'], array('gotoTerminalPath'));
$attrs= $ldap->fetch();
if (isset($attrs['gotoTerminalPath'])){
$this->gotoTerminalPath= $attrs['gotoTerminalPath'][0];
}
/* Strip out 'default' values */
if ($this->attrs['gotoLdapServer'] == "default"){
- unset ($this->attrs['gotoLdapServer']);
+ $this->attrs['gotoLdapServer']= array();
+ }
+
+ if ($this->attrs['gotoBootKernel'] == "%default%" || $this->attrs['gotoBootKernel'] == "default"){
+ $this->attrs['gotoBootKernel']= array();
}
/* if mirror == none stop saving this attribute */
if($this->FAIdebianMirror == "none"){
$this->FAIdebianMirror = "";
}
-
- if((count($this->attrs['FAIclass'])==0)&&(empty($this->FAIdebianMirror))){
+
+ /* Remove FAI objects if no FAI class is selected */
+ if(count($this->FAIclass)==0){
$tmp = array();
foreach($this->attrs['objectClass'] as $class){
if($class != "FAIobject"){
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving workstation startup settings failed"));
$this->handle_post_events("modify");
}