From 0005a06927cdeb9a678b1cd34564fbd854160638 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 4 Aug 2008 03:45:22 +0000 Subject: [PATCH] Revert r38427 "Create User::getGroupsInRoles(). Given an array of roles (edit, read, delete), return the groups allowed to do each." This seems a bit odd; the name is certainly confusing -- getGroupsWithPermissions() would be clearer, but I'm not really sure I see why it's given an arbitrary-length list here (vs a simpler single check which can simply be run multiple times). --- includes/User.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/includes/User.php b/includes/User.php index 09326cc1f5..5c12981970 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2767,23 +2767,6 @@ class User { } return $rights; } - - /** - * @param $roles Array: list of roles - * @return array list of groups with the given permission - */ - static function getGroupsInRoles( $roles ) { - global $wgGroupPermissions; - $allowedGroups = array(); - foreach ( $roles as $role ) { - foreach ( $wgGroupPermissions as $group => $rights ) { - if ( $rights[$role] === true ) { - $allowedGroups[$role][] = $group; - } - } - } - return $allowedGroups; - } /** * @param $group String: key name -- 2.20.1