diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc
index e4d3412abf273d1767415fc05ca4aaa01f406f39..7a02964f21b2b15e9cac8df5a262bdbd8d7a387f 100644 (file)
$fh= popen($command, "r");
while (!feof($fh)) {
$buffer= fgets($fh, 256);
- $this->gotoBootKernels[]= $buffer;
+ if(!empty($buffer)){
+ $this->gotoBootKernels[]= $buffer;
+ }
}
pclose($fh);
- sort($this->gotoBootKernels);
}
}
}
$this->goLdapServerList[$server] = $visible;
}
+
+ /* Load hardware list */
+ $ldap= $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))");
+ if ($ldap->count() == 1){
+ $map= array("gotoLdapServer");
+ $attrs= $ldap->fetch();
+
+ foreach ($map as $name){
+ if (!isset($attrs[$name][0])){
+ continue;
+ }
+
+ switch ($name){
+ case 'gotoLdapServer':
+ $this->goLdapServerList= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].']' ), $this->goLdapServerList);
+ break;
+ }
+ }
+ }
}
function execute()
$SelectBoxLdapServer->AddEntry(
array(
- array("string"=>$visible),
array("string"=>"<input type='radio' name='gotoLdapServer' value='".$server."' ".$use.">",
- "attach"=>"style='border-right:0px;'")
+ "attach"=>"style='border-left:0px;'"),
+ array("string"=>$visible)
));
}
/* Strip out 'default' values */
foreach(array("gotoBootKernel","gotoLdapServer") as $value){
- if ($this->attrs[$value] == "default"){
+ if (!isset($this->attrs[$value]) || $this->attrs[$value] == "default"){
$this->attrs[$value] = array();
}
}