From 2ead34f0a2bb377ce02bacead6d68ab6ad370d9e Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 25 Jul 2009 19:36:14 +0000 Subject: [PATCH] * (bug 19301) Duplicates entries in $wgAddGroups, $wgRemoveGroups, $wgGroupsAddToSelf and $wgGroupsRemoveFromSelf are no more displayed on Special:ListGroupRights --- RELEASE-NOTES | 3 +++ includes/specials/SpecialListgrouprights.php | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f57b8b9df8..e3facecd70 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/specials/SpecialListgrouprights.php b/includes/specials/SpecialListgrouprights.php index 9a35336473..ea76ea9509 100644 --- a/includes/specials/SpecialListgrouprights.php +++ b/includes/specials/SpecialListgrouprights.php @@ -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 -- 2.20.1