From 0124773e1710d953b3ee2f3d162b5b4f443210c1 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 25 Oct 2007 13:38:43 +0000 Subject: [PATCH] Fixed FAI assignment in workstation Startup git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7660 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_workstationStartup.inc | 14 ++++++++++---- plugins/admin/systems/workstationStartup.tpl | 8 +++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 42f98ee61..6e72439f9 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -59,7 +59,7 @@ class workstartup extends plugin var $CopyPasteVars = array("gotoModules","gotoShares"); var $fai_activated = FALSE; - + var $o_group_dn =""; var $member_of_ogroup = FALSE; function workstartup (&$config, $dn= NULL, $parent= NULL) @@ -78,8 +78,12 @@ class workstartup extends plugin 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; + $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))",array("cn","dn")); + if($ldap->count()){ + $this->member_of_ogroup = TRUE; + $attrs = $ldap->fetch(); + $this->o_group_dn = $attrs['dn']; + } } /* Creating a list of valid Mirrors @@ -335,6 +339,9 @@ class workstartup extends plugin }else{ $map= array("gotoBootKernel"); } + + $ldap = $this->config->get_ldap_link(); + $ldap->cat($this->o_group_dn); $attrs= $ldap->fetch(); foreach ($map as $name){ @@ -518,7 +525,6 @@ class workstartup extends plugin function execute() { - /* Call parent execute */ plugin::execute(); diff --git a/plugins/admin/systems/workstationStartup.tpl b/plugins/admin/systems/workstationStartup.tpl index ca5739033..f68115942 100644 --- a/plugins/admin/systems/workstationStartup.tpl +++ b/plugins/admin/systems/workstationStartup.tpl @@ -75,7 +75,13 @@ {render acl=$FAIdebianMirrorACL} {/render} -- 2.30.2