From: hickert Date: Mon, 14 Apr 2008 10:06:28 +0000 (+0000) Subject: Reverted last change. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=05d0bc993b499469745e6e5194c2a95410819d77;p=gosa.git Reverted last change. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10404 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index cc6a20b0e..1814daf6f 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -89,41 +89,38 @@ class faiPackage extends plugin } $PackageFilter = "(&(objectClass=FAIdebconfInfo)(|".$PackageFilter."))"; - $res = FAI::get_all_objects_for_given_base(FAI::get_release_dn($dn),$PackageFilter); + /* Search for configuration objects */ $ldap = $this->config->get_ldap_link(); - $ldap->cd($this->config->current['BASE']); - foreach($res as $dn_v){ - if(preg_match("/".normalizePreg($dn)."$/",$dn_v['dn'])){ + $ldap->cd($this->dn); + $ldap->search($PackageFilter,array("FAIvariable","FAIvariableType", + "FAIvariableContent","FAIpackage","FAIdebianSection","FAIstate")); - $ldap->cat($dn_v['dn']); - $attr = $ldap->fetch(); - - /* Walk through configurations and append them to our list of ConfiguredPackages - */ + /* Walk through configurations and append them to our list of ConfiguredPackages + */ + while($attr = $ldap->fetch()){ - /* Skip objects, that are tagged as removed */ - if(isset($object['FAIstate'][0])){ - if(preg_match("/removed$/",$attr['FAIstate'][0])){ - continue; - } + /* Skip objects, that are tagged as removed */ + if(isset($object['FAIstate'][0])){ + if(preg_match("/removed$/",$attr['FAIstate'][0])){ + continue; } + } - $tmp =array(); - $tmp['Name'] = $attr['FAIvariable'][0]; - $tmp['Type'] = $attr['FAIvariableType'][0]; - - if (isset($attr['FAIvariableContent'][0])){ - if(!in_array($attr['FAIvariableType'],array("multiselect"))){ - $tmp['Value'] = $attr['FAIvariableContent'][0]; - }else{ - $content = array(); - unset($attr['FAIvariableContent']['count']); - foreach($attr['FAIvariableContent'] as $attr){ - $tmp['Value'][] = $attr; - } + $tmp =array(); + $tmp['Name'] = $attr['FAIvariable'][0]; + $tmp['Type'] = $attr['FAIvariableType'][0]; + + if (isset($attr['FAIvariableContent'][0])){ + if(!in_array($attr['FAIvariableType'],array("multiselect"))){ + $tmp['Value'] = $attr['FAIvariableContent'][0]; + }else{ + $content = array(); + unset($attr['FAIvariableContent']['count']); + foreach($attr['FAIvariableContent'] as $attr){ + $tmp['Value'][] = $attr; } - $this->ConfiguredPackages[$attr['FAIpackage'][0]][$attr['FAIvariable'][0]]=$tmp; } + $this->ConfiguredPackages[$attr['FAIpackage'][0]][$attr['FAIvariable'][0]]=$tmp; } }