X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Ffunctions_FAI.inc;h=d542bd4c95d31aa2af21d72270b26bae1721e271;hb=f9e2a15ea3578c6c86efef30a0c8ebededefbb9e;hp=781f66c93386b5cc222b33aa0502d6f335e9bad7;hpb=debae573752557eb5a0d09189ff40eca92c3735b;p=gosa.git diff --git a/include/functions_FAI.inc b/include/functions_FAI.inc index 781f66c93..d542bd4c9 100644 --- a/include/functions_FAI.inc +++ b/include/functions_FAI.inc @@ -37,14 +37,12 @@ function get_all_objects_for_given_base($Current_DN,$filter,$detailed = false) foreach($deps_to_search as $fai_base){ /* Ldap search for fai classes specified in this release */ - $ldap->cd($fai_base); - $ldap->search($filter,array("dn","objectClass","FAIstate")); - + $res_tmp = get_list($filter,"fai",$fai_base,array("dn","objectClass","FAIstate"),GL_SUBSEARCH | GL_SIZELIMIT); + /* check the returned objects, and add/replace them in our return variable */ - while($attr = $ldap->fetch()){ + foreach($res_tmp as $attr){ $buffer = array(); -# $name = str_ireplace($release,"",$attr['dn']); $name = preg_replace("/".normalizePreg($release)."/i","",$attr['dn']); if(isset($attr['FAIstate'][0])){ @@ -575,7 +573,6 @@ function get_previous_releases_of_this_release($dn,$flat) $ret = array(); /* Explode dns into pieces, to be able to build parent dns */ -# $dns_to_check = gosa_ldap_explode_dn(str_ireplace(",".$config->current['BASE'],"",$dn),0); $dns_to_check = gosa_ldap_explode_dn(preg_replace("/".normalizePreg(",".$config->current['BASE'])."/i","",$dn)); if(!is_array($dns_to_check)){ @@ -681,7 +678,6 @@ function get_release_dn($Current_DN) $ldap->cd($config->current['BASE']); /* Split dn into pices */ -# $dns_to_check = gosa_ldap_explode_dn(str_ireplace(",".$config->current['BASE'],"",$Current_DN),0); $dns_to_check = gosa_ldap_explode_dn(preg_replace("/".normalizePreg(",".$config->current['BASE'])."/i","",$Current_DN)); if(!is_array($dns_to_check)){