Code

Updated description
[gosa.git] / gosa-core / plugins / admin / acl / class_filterACL.inc
index a12e22796622d9d60743bc44df75477af403d46d..135e5198f8862b4c388563f2a30dc324b0309fb5 100644 (file)
@@ -7,7 +7,11 @@ class filterACL {
     $config= session::global_get('config');
     $ldap= $config->get_ldap_link(TRUE);
     $flag= ($scope == "sub")?GL_SUBSEARCH:0;
-    $result= filterACL::get_list($base, $filter, $attributes, $category, $objectStorage, $flag | GL_SIZELIMIT, "cat");
+    $result=array();
+    $result= array_merge($result,filterACL::get_list($base, $filter, $attributes, $category, array(), $flag | GL_SIZELIMIT, "cat"));
+    if($scope == "sub"){
+      $result= array_merge($result,filterACL::get_list($base, $filter, $attributes, $category, array(), $flag | GL_SIZELIMIT, "search"));
+    }
     $result= array_merge($result,filterACL::get_list($base, $filter, $attributes, $category, $objectStorage, $flag | GL_SIZELIMIT, ""));
     return(filterACL::unifyResult($result));
   }
@@ -96,8 +100,8 @@ class filterACL {
       $ldap->cd($base);
       if ($method == "ls") {
         $ldap->ls("(&$filter$dnFilter)", $base, $attributes);
-      } elseif($method == "cat") {
-        $ldap->cat($base, $attributes);
+      } elseif ($method == "cat") {
+        $ldap->cat($base, $attributes, "(&$filter$dnFilter)");
       } else {
         $ldap->search("(&$filter$dnFilter)", $attributes);
       }