summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a7989ee)
raw | patch | inline | side by side (parent: a7989ee)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 May 2006 07:26:02 +0000 (07:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 May 2006 07:26:02 +0000 (07:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3536 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_workstationStartup.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 2a03e655478a2bb74cbe3bf3a94fcf66c87e30b2..c5f1cd00cd6f06f1695867b83e23dd4c76718ffa 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
- $this->goLdapServerList= $this->config->data['SERVERS']['LDAP'];
+ foreach($this->config->data['SERVERS']['LDAP'] as $server) {
+ $this->goLdapServerList[$server]= $server; // $this->config->data['SERVERS']['LDAP'];
+ }
$_SESSION['getAvailableClassesForThisRelease_CACHE'] = array();
$_SESSION['getAvailableClassesForThisRelease_CACHED_CLASSES'] = array();
/* 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");
-
- if (!check_command($command)){
- $message[]= sprintf(_("Command '%s', specified as KERNELS hook for plugin '%s' doesn't seem to exist."), $command,
- get_class($this));
- } else {
- $fh= popen($command, "r");
- while (!feof($fh)) {
- $buffer= trim(fgets($fh, 256));
-
- if ($buffer != ""){
- $this->gotoBootKernels[preg_replace('/:.*$/', '', $buffer)]= $buffer;
- }
- }
- pclose($fh);
- ksort($this->gotoBootKernels);
- }
-
- }
/* 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");
+ $map= array("gotoLdapServer","gotoBootKernel");
$attrs= $ldap->fetch();
foreach ($map as $name){
continue;
}
-print_a($attrs);
switch ($name){
case 'gotoLdapServer':
$this->goLdapServerList= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].']' ), $this->goLdapServerList);
break;
-# case 'gotoXColordepth':
-# $this->XColordepths= array_merge(array('default' => $attrs[$name][0].' ['._("inherited").']' ), $this->XColordepths);
-# break;
-# case 'gotoXKbModel':
-# $this->XKbModels= array_merge(array('default' => $attrs[$name][0].' ['._("inherited").']' ), $this->XKbModels);
-# break;
-# case 'gotoXKbLayout':
-# $this->XKbLayouts= array_merge(array('default' => $attrs[$name][0].' ['._("inherited").']' ), $this->XKbLayouts);
-# break;
-# case 'gotoXKbVariant':
-# $this->XKBvariants= array_merge(array('default' => $attrs[$name][0].' ['._("inherited").']' ), $this->XKbVariants);
-# break;
-# case 'gotoMouseType':
-# $this->XMouseTypes= array_merge(array('default' => $attrs[$name][0].' ['._("inherited").']' ), $this->XMouseTypes);
-# break;
-# case 'gotoMousePort':
-# $this->XMousePorts= array_merge(array('default' => $attrs[$name][0].' ['._("inherited").']' ), $this->XMousePorts);
-# break;
+
+ case 'gotoBootKernel':
+ $this->gotoBootKernels['%default%']= _("inherited").' ['.$attrs[$name][0].']' ;
+ break;
+
}
}
}
+ /* Get list of boot kernels */
+ if (isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "KERNELS");
+
+ if (!check_command($command)){
+ $message[]= sprintf(_("Command '%s', specified as KERNELS hook for plugin '%s' doesn't seem to exist."), $command,
+ get_class($this));
+ } else {
+
+ $fh= popen($command, "r");
+ while (!feof($fh)) {
+ $buffer= trim(fgets($fh, 256));
+ if ($buffer != ""){
+ $this->gotoBootKernels[preg_replace('/:.*$/', '', $buffer)]= $buffer;
+ }
+ }
+ pclose($fh);
+ }
+ }
+
}
/* Add Entries
*/
- foreach($tmp as $server){
+ foreach($tmp as $key => $server){
$use ="";
if(($this->gotoLdapServer == $server) || ($found == false)) {
$found = true;
$SelectBoxLdapServer->AddEntry(
array(
array("string"=>$display),
- array("string"=>"<input type='radio' name='gotoLdapServer' value='".$server."' ".$use.">",
+ array("string"=>"<input type='radio' name='gotoLdapServer' value='".$key."' ".$use.">",
"attach"=>"style='border-right:0px;'")
));
}
/* Find proper terminal path for tftp configuration
FIXME: This is suboptimal when the default has changed to
another location! */
- if ($this->gotoTerminalPath == "default"){
+ if (($this->gotoTerminalPath == "default")){
$ldap= $this->config->get_ldap_link();
/* Strip relevant part from dn, keep trailing ',' */
}
if(!isset($this->attrs["$val"])) $this->attrs["$val"]=array();
}
+
/* Strip out 'default' values */
if ($this->attrs['gotoLdapServer'] == "default"){
$this->attrs['gotoLdapServer']= array();
}
- if ($this->attrs['gotoBootKernel'] == "%default%" || $this->attrs['gotoBootKernel'] == "default"){
+ if (($this->attrs['gotoBootKernel'] == "default") || ($this->attrs['gotoBootKernel'] == "%default%")){
$this->attrs['gotoBootKernel']= array();
}