From: cajus Date: Mon, 29 May 2006 04:53:57 +0000 (+0000) Subject: Updated "inherit" fields X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=274c1b77ba78f47cea1c0bc4300b1a33e5354689;p=gosa.git Updated "inherit" fields git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3533 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_config.inc b/include/class_config.inc index d13bcf5d9..6d028a11b 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -412,7 +412,7 @@ class config { } /* Ldap Server */ - $this->data['SERVERS']['LDAP']= array("default"); + $this->data['SERVERS']['LDAP']= array(); $ldap->cd ($this->current['BASE']); $ldap->search ("(objectClass=goLdapServer)"); while ($attrs= $ldap->fetch()){ diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 71e39672e..2a03e6554 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -53,8 +53,8 @@ class workstartup extends plugin */ $ldap = $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - - $this->goLdapServerList = array("default" =>"["._("inherited")."]"); + + $this->goLdapServerList= $this->config->data['SERVERS']['LDAP']; $_SESSION['getAvailableClassesForThisRelease_CACHE'] = array(); $_SESSION['getAvailableClassesForThisRelease_CACHED_CLASSES'] = array(); @@ -276,6 +276,46 @@ class workstartup extends plugin } + /* 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; + } + +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; + } + } + } + } @@ -582,7 +622,7 @@ class workstartup extends plugin $smarty->assign("gotoBootKernels",$this->gotoBootKernels); /* Arrays */ - $tmp = $this->config->data['SERVERS']['LDAP']; + $tmp = $this->goLdapServerList; /* Create divSelectBox for ldap server selection */ @@ -608,11 +648,7 @@ class workstartup extends plugin $use = " checked "; }; - if($server == "default"){ - $display = "["._("inherited")."]"; - }else{ - $display = $server; - } + $display = $server; $SelectBoxLdapServer->AddEntry( array(