From 29b586c67777934802b559d1cb5775a236eb873b Mon Sep 17 00:00:00 2001 From: Huji Lee Date: Wed, 7 Dec 2016 14:15:52 -0500 Subject: [PATCH] Special:Userrights should set isself on page view, not just on submit Partially reverts I57e9ca4f20fe557e4024c4f5a4865170f02ebb45 Bringing back lines that were incorrectly removed Bug: T152600 Change-Id: I5e1171be4cb75a6d7cce5f99b9d31dc0cb5d8db3 --- includes/specials/SpecialUserrights.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 3ba46c1b75..1d9c0579f9 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -88,6 +88,10 @@ class UserrightsPage extends SpecialPage { $this->mTarget = trim( $this->mTarget ); } + if ( $this->mTarget !== null && User::getCanonicalName( $this->mTarget ) === $user->getName() ) { + $this->isself = true; + } + $fetchedStatus = $this->fetchUser( $this->mTarget, true ); if ( $fetchedStatus->isOK() ) { $this->mFetchedUser = $fetchedStatus->value; -- 2.20.1