From: Kunal Mehta Date: Wed, 4 Feb 2015 02:27:28 +0000 (-0800) Subject: Unbreak interwiki user rights granting X-Git-Tag: 1.31.0-rc.0~12520 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=d7e6f9457649ba62863dc1aee410191f909c8395;p=lhc%2Fweb%2Fwiklou.git Unbreak interwiki user rights granting UserRightsProxy does not have an equals method, nor does CentralAuthGroupMembershipProxy. This reverts the problematic part of 80ca508ed117bbf547 which caused fatal errors. Bug: T88505 Change-Id: I6c1dfe14bc08193c33f86482c8f835500c0dc21c --- diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 3bf75a0e01..a5edcb02ca 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -218,7 +218,7 @@ class UserrightsPage extends SpecialPage { /** * Save user groups changes in the database. * - * @param User $user + * @param User|UserRightsProxy $user * @param array $add Array of groups to add * @param array $remove Array of groups to remove * @param string $reason Reason for group change @@ -228,7 +228,7 @@ class UserrightsPage extends SpecialPage { global $wgAuth; // Validate input set... - $isself = $user->equals( $this->getUser() ); + $isself = $user->getName() == $this->getUser()->getName(); $groups = $user->getGroups(); $changeable = $this->changeableGroups(); $addable = array_merge( $changeable['add'], $isself ? $changeable['add-self'] : array() );