X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_workstationStartup.inc;h=02e5b7ea0c81668b990c35aacdbff524795c686c;hb=c30fdf675865a86365275ed6fb9f8a0cc06e41af;hp=be645996ff75d16e02a3f86fc9d94eb84cca98f3;hpb=1d957e1b78d77000b55503949daea464e1888817;p=gosa.git diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index be645996f..02e5b7ea0 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -51,6 +51,7 @@ class workstartup extends plugin var $FAIServRepConfig = array(); var $fai_activated = FALSE; + var $member_of_ogroup = FALSE; function workstartup ($config, $dn= NULL, $parent= NULL) { @@ -65,6 +66,13 @@ class workstartup extends plugin plugin::plugin ($config, $dn, $parent); + if(!isset($this->parent->by_object['ogroup'])){ + $ldap = $this->config->get_ldap_link(); + $ldap->cd ($this->config->current['BASE']); + $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))",array("cn")); + $this->member_of_ogroup = $ldap->count() >= 1; + } + /* Creating a list of valid Mirrors * none will not be saved to ldap. */ @@ -296,11 +304,11 @@ 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){ + if ($this->member_of_ogroup){ + if(count($this->FAIclass)==0 && $this->FAIrelease == ""){ + $this->FAIdebianMirror = "inherited"; + } if($this->fai_activated){ $map= array("gotoLdapServer","FAIclass","FAIdebianMirror","gotoBootKernel"); @@ -376,9 +384,6 @@ class workstartup extends plugin $this->gotoBootKernel= "default"; } - if(count($this->FAIclass)==0 && $this->FAIrelease == ""){ - $this->FAIdebianMirror = "inherited"; - } } @@ -825,7 +830,13 @@ class workstartup extends plugin function getFAIdebianMirrors() { $ret = array(); - $ret['inherited']="["._("inherited")."]"; + + /* Only add inherit option, if we are part in an object group + */ + if($this->member_of_ogroup) { + $ret['inherited']="["._("inherited")."]"; + } + $ret['auto']=_("automatic"); $secs = array();