Code

Fixed duplicated acls.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 20 Feb 2008 13:49:35 +0000 (13:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 20 Feb 2008 13:49:35 +0000 (13:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8988 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/acl/class_aclManagement.inc

index 6db90f32fb63cc137bcdaf6f8aa45e7f6483a16c..d924c5998a0083c422fb1049dc0d52b652c1ec27 100644 (file)
@@ -508,7 +508,7 @@ class aclManagement extends plugin
         if($Type == "search"){
           $tmp = get_list($Filter, "acl", $fetch_base, $Attrs, $Flags);
           foreach($tmp as $entry){
-            $res[] = $entry;
+            $res[$entry['dn']] = $entry;
           }
         }else{
           $ldap->cat($fetch_base,$Attrs);
@@ -519,17 +519,17 @@ class aclManagement extends plugin
             if(!isset($attrs['ou']) && !isset($attrs['cn'])){
               $namingAttr= preg_replace("/^[^=]*+=([^,]*),.*$/","\\1",$fetch_base);
               if(preg_match("/".$re2."/i",$namingAttr)){
-                $res[] = $attrs;
+                $res[$attrs['dn']] = $attrs;
               }
             }elseif( (isset($attrs['cn'][0]) && preg_match("/".$re2."/i",$attrs['cn'][0]))
                ||(isset($attrs['ou'][0]) && preg_match("/".$re2."/i",$attrs['ou'][0]))){
-              $res[] = $attrs;
+              $res[$attrs['dn']] = $attrs;
             }
           }
         }
       }
     }
-    $this->list = $res;
+    $this->list = array_values($res);
   }