From: hickert Date: Mon, 29 May 2006 10:35:00 +0000 (+0000) Subject: Added ldap base inherit, for terminal - Starttab X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a704b3b5455080712cc0338a528b58c25eb81c09;p=gosa.git Added ldap base inherit, for terminal - Starttab git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3541 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index e4d3412ab..e795803be 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -96,10 +96,11 @@ class termstartup extends plugin $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); } } @@ -111,6 +112,27 @@ class termstartup extends plugin } $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()