Code

Fixed fai branch search
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 13:06:57 +0000 (13:06 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 18 May 2006 13:06:57 +0000 (13:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3430 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiManagement.inc

index b171bf9364d83bfe849264d4322a36488eb0ae83..95907126a9116dcce95cde4b0b851afc83e7e1ed 100644 (file)
@@ -555,20 +555,16 @@ class faiManagement extends plugin
   {
     $ret = array("main"=>"/");
     $ldap = $this->config->get_ldap_link();
-    $ldap->cd($this->config->current['BASE']);
     if(!$base){
-               $base= "ou=fai,ou=configs,ou=systems,".$this->DivListFai->selectedBase;
+      $base= "ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase'];
     }
-    $ldap->cd($base);
-    $ldap->ls("(objectClass=FAIbranch)",$base);
+    ldap->ls("(objectClass=FAIbranch)",$base);
     while($attrs = $ldap->fetch()){
       if((isset($attrs['ou']))&&($attrs['dn']!=$base)){
         $ret[$attrs['dn']]= $prefix.$attrs['ou'][0];
         $ret = array_merge($ret,$this->getBranches($attrs['dn'],"".$prefix.$attrs['ou'][0]."/"));
       }
     }
-    return($ret);
-  }
 
   
   /* reload list of objects */