From: hickert Date: Wed, 20 Feb 2008 13:49:35 +0000 (+0000) Subject: Fixed duplicated acls. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=acc54f593f0a71a2bd33d93060b8575a3bdb22ef;p=gosa.git Fixed duplicated acls. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8988 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index 6db90f32f..d924c5998 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -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); }