From: umherirrender Date: Mon, 30 Nov 2015 18:02:48 +0000 (+0100) Subject: Call Skin::setRelevantUser on Special:UserRights X-Git-Tag: 1.31.0-rc.0~8697^2 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=38b9b0becd1b8d8107004c971cf0bc8d7f69dced;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) ) {