Code

Fixed acl object fetching
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Dec 2006 10:23:28 +0000 (10:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 15 Dec 2006 10:23:28 +0000 (10:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5410 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/acl/class_aclManagement.inc

index a6ce227ddb6530c7d63befbd7ce074671253f515..9d5757197620a6a26d2adb196534b955269b5148 100644 (file)
@@ -341,7 +341,10 @@ class aclManagement extends plugin
       /* Get all object in this base */
       $Flags        = GL_SIZELIMIT | GL_SUBSEARCH;
       $fetch_base   = $base;
       /* Get all object in this base */
       $Flags        = GL_SIZELIMIT | GL_SUBSEARCH;
       $fetch_base   = $base;
-      $res = get_list($Filter, "acl", $fetch_base, $Attrs, $Flags);
+      $tmp = get_list($Filter, "acl", $fetch_base, $Attrs, $Flags);
+      foreach($tmp as $entry){
+        $res[$entry['dn']] = $entry;
+      }
 
     }else{
 
 
     }else{
 
@@ -356,6 +359,9 @@ class aclManagement extends plugin
         /* Check if method is cat or search */
         if($Type == "search"){
           $tmp = get_list($Filter, "acl", $fetch_base, $Attrs, $Flags);
         /* Check if method is cat or search */
         if($Type == "search"){
           $tmp = get_list($Filter, "acl", $fetch_base, $Attrs, $Flags);
+          foreach($tmp as $entry){
+            $res[$entry['dn']] = $entry;
+          }
         }else{
           $ldap->cat($fetch_base,$Attrs);
           if($ldap->count())          {
         }else{
           $ldap->cat($fetch_base,$Attrs);
           if($ldap->count())          {
@@ -364,11 +370,10 @@ class aclManagement extends plugin
             if( (isset($attrs['cn'][0]) && preg_match("/".$re2."/i",$attrs['cn'][0]))
                |(isset($attrs['ou'][0]) && preg_match("/".$re2."/i",$attrs['ou'][0]))){
 
             if( (isset($attrs['cn'][0]) && preg_match("/".$re2."/i",$attrs['cn'][0]))
                |(isset($attrs['ou'][0]) && preg_match("/".$re2."/i",$attrs['ou'][0]))){
 
-              $tmp = array($attrs);
+              $res[$attrs['dn']] = $attrs;
             }
           }
         }
             }
           }
         }
-        $res = array_merge($res,$tmp);
       }
     }
     $this->list = $res;
       }
     }
     $this->list = $res;