Code

Limit scope of get_child_objects and some cosmetic
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Jun 2009 13:10:43 +0000 (13:10 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Jun 2009 13:10:43 +0000 (13:10 +0000)
changes.

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13820 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-plugins/fai/admin/fai/class_FAI.inc

index 2a1dfe0da5cf6ff0a860b3ee8c163b9593e08cc8..605acb8dfd5550b92697fb84525aef99e6ee5d60 100644 (file)
@@ -1303,7 +1303,7 @@ class FAI
     }
   }
 
-  /* Return child objects, if there are any */
+  /* Return child objects, if there are any */
   static function get_child_objects($dn)
   {
     global $config;
@@ -1312,10 +1312,9 @@ class FAI
 
     if (FAI::is_parent_object($Current_DN)){
       $ldap = $config->get_ldap_link();
-      $ldap->cd($config->current['BASE']);
+      $ldap->cd($dn);
       $ldap->search("(objectClass=FAIclass)",array("dn"));
       while($attrs = $ldap->fetch()){
-        $newdn=$attrs['dn'];
         if(preg_match("/".preg_quote($Current_DN, '/')."/",$attrs['dn']) && $attrs['dn'] != $Current_DN){
           $children[] = $attrs['dn'];
         }