From 38b9b0becd1b8d8107004c971cf0bc8d7f69dced Mon Sep 17 00:00:00 2001 From: umherirrender Date: Mon, 30 Nov 2015 19:02:48 +0100 Subject: [PATCH] Call Skin::setRelevantUser on Special:UserRights Adding the relevant user to the skin will add user releated links to the naviagtion bar. User related links are: contributions, logs and blocks Needs a instanceof check, because there are also interwiki user possible on this special page, very this feature cannot be used with. Change-Id: I8e414876d6314cb3369d0f5d661892c0999dcfa2 --- includes/specials/SpecialUserrights.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 1327972e66..ea22274d8b 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -117,6 +117,11 @@ class UserrightsPage extends SpecialPage { $fetchedStatus = $this->fetchUser( $this->mTarget ); if ( $fetchedStatus->isOk() ) { $this->mFetchedUser = $fetchedStatus->value; + if ( $this->mFetchedUser instanceof User ) { + // Set the 'relevant user' in the skin, so it displays links like Contributions, + // User logs, UserRights, etc. + $this->getSkin()->setRelevantUser( $this->mFetchedUser ); + } } if ( !$this->userCanChangeRights( $user, true ) ) { -- 2.20.1