Code

Closes #310 Moved copy_FAI_resource_recursive to faiManagement. It is only used there.
[gosa.git] / gosa-core / include / functions_FAI.inc
index 7b2b6170fa0212b9197fd43fe74fec490882308b..b954d61fc76e44354218087d2121af89f96b4db2 100644 (file)
@@ -37,7 +37,8 @@ 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 */
-      $res_tmp = get_list($filter,"fai",$fai_base,array("dn","objectClass","FAIstate"),GL_SUBSEARCH | GL_SIZELIMIT);
+      $attributes  = array("dn","objectClass","FAIstate","cn");
+      $res_tmp = get_list($filter,"fai",$fai_base,$attributes,GL_SUBSEARCH | GL_SIZELIMIT);
   
       /* check the returned objects, and add/replace them in our return variable */
       foreach($res_tmp as $attr){
@@ -54,7 +55,6 @@ function get_all_objects_for_given_base($Current_DN,$filter,$detailed = false)
           }
         }
 
-
         /* In detailed mode are some additonal informations visible */
         if($detailed){
 
@@ -67,8 +67,12 @@ function get_all_objects_for_given_base($Current_DN,$filter,$detailed = false)
           }
 
           /* Append objectClass to resulsts */
-          $buffer['objectClass']  = $attr['objectClass'];
-          unset($buffer['objectClass'][0]);
+          foreach($attributes as $val){
+            if(isset($attr[$val])){
+              $buffer[$val] = $attr[$val];
+            }
+          }
+          unset($buffer['objectClass']['count']);
         }
 
         /* Add this object to our list */