index 2c9297cad61318ec18086630e0982d10710fb70a..d542bd4c95d31aa2af21d72270b26bae1721e271 100644 (file)
foreach($deps_to_search as $fai_base){
/* Ldap search for fai classes specified in this release */
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 */
/* check the returned objects, and add/replace them in our return variable */
- while($attr = $ldap->fetch()){
+ foreach($res_tmp as $attr){
$buffer = array();
$buffer = array();
-# $name = str_ireplace($release,"",$attr['dn']);
$name = preg_replace("/".normalizePreg($release)."/i","",$attr['dn']);
if(isset($attr['FAIstate'][0])){
$name = preg_replace("/".normalizePreg($release)."/i","",$attr['dn']);
if(isset($attr['FAIstate'][0])){
$ret = array();
/* Explode dns into pieces, to be able to build parent dns */
$ret = array();
/* Explode dns into pieces, to be able to build parent dns */
-# $dns_to_check = ldap_explode_dn(str_ireplace(",".$config->current['BASE'],"",$dn),0);
- $dns_to_check = ldap_explode_dn(preg_replace("/".normalizePreg(",".$config->current['BASE'])."/i","",$dn),0);
- echo "<font color='red'>Replace ldap_explode_dn it is evil, it changes characters within result... </font><br>";
+ $dns_to_check = gosa_ldap_explode_dn(preg_replace("/".normalizePreg(",".$config->current['BASE'])."/i","",$dn));
if(!is_array($dns_to_check)){
return;
if(!is_array($dns_to_check)){
return;
$ldap->cd($config->current['BASE']);
/* Split dn into pices */
$ldap->cd($config->current['BASE']);
/* Split dn into pices */
-# $dns_to_check = ldap_explode_dn(str_ireplace(",".$config->current['BASE'],"",$Current_DN),0);
- $dns_to_check = ldap_explode_dn(preg_replace("/".normalizePreg(",".$config->current['BASE'])."/i","",$Current_DN),0);
- echo "<font color='red'>Replace ldap_explode_dn it is evil, it changes characters within result... </font><br>";
+ $dns_to_check = gosa_ldap_explode_dn(preg_replace("/".normalizePreg(",".$config->current['BASE'])."/i","",$Current_DN));
if(!is_array($dns_to_check)){
return;
if(!is_array($dns_to_check)){
return;