* (bug 19301) Duplicates entries in $wgAddGroups, $wgRemoveGroups, $wgGroupsAddToSelf...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 25 Jul 2009 19:36:14 +0000 (19:36 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 25 Jul 2009 19:36:14 +0000 (19:36 +0000)
RELEASE-NOTES
includes/specials/SpecialListgrouprights.php

index f57b8b9..e3facec 100644 (file)
@@ -330,6 +330,9 @@ this. Was used when mwEmbed was going to be an extension.
 * The display of the language list on the preferences is more comply with the 
   BCP 47 standards.
 * (bug 19849) Custom X-Vary-Options header now disabled unless $wgUseXVO is set
+* (bug 19301) Duplicates entries in $wgAddGroups, $wgRemoveGroups,
+  $wgGroupsAddToSelf and $wgGroupsRemoveFromSelf are no more displayed on
+  Special:ListGroupRights
 
 == API changes in 1.16 ==
 
index 9a35336..ea76ea9 100644 (file)
@@ -125,6 +125,13 @@ class SpecialListGroupRights extends SpecialPage {
         */
         private static function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) {
                global $wgLang;
+
+               // prevent double entries if misconfigured, bug 19301
+               $add = array_unique( $add );
+               $remove = array_unique( $remove );
+               $addSelf = array_unique( $addSelf );
+               $removeSelf = array_unique( $removeSelf );
+
                $r = array();
                foreach( $permissions as $permission => $granted ) {
                        //show as granted only if it isn't revoked to prevent duplicate display of permissions