From 95b36034dc041a4fd6eea9a7dc84018dd558f16a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 6 Jan 2010 15:36:29 +0000 Subject: [PATCH] Moved default release detection into constructor git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15091 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_faiManagement.inc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index e70b5ba9c..1719e82c3 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -61,7 +61,13 @@ class faiManagement extends management } $this->fai_base = get_ou("faiBaseRDN").$this->config->current['BASE']; - $this->fai_release = $this->fai_base; + $cfg_rel = $this->config->search("faiManagement","DEFAULTFAIRELEASE",array("menu")); + if(!empty($cfg_rel)){ + $this->fai_release = $cfg_rel; + }else{ + $this->fai_release = $this->fai_base; + } + $this->acl_base = $this->config->current['BASE']; $this->ui = $ui; $this->storagePoints = array( @@ -825,16 +831,9 @@ class faiManagement extends management $ldap = $this->config->get_ldap_link(); $ldap->ls("(objectClass=FAIbranch)",$base,array("ou","FAIstate")); - $cfg_rel = $this->config->search("faiManagement","DEFAULTFAIRELEASE",array("menu")); while($release = $ldap->fetch()){ $list[$release['dn']] = $prefix.$release['ou'][0]; - - // Preset to prefered releaes if necessary - if(empty($this->fai_release) && $cfg_rel == $release['dn']){ - $this->fai_release = $release['dn']; - } - $list = array_merge($list,$this->getReleaseList($release['dn'],$prefix."  ")); } return($list); -- 2.30.2