From: Alex Monk Date: Wed, 4 Apr 2012 00:00:06 +0000 (+0100) Subject: Show Log toolbox link for anon users, fix toolbox on DeletedContribs X-Git-Tag: 1.31.0-rc.0~24016^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=00c4f2255f86c9ca49aace4c410d3f437827b1c6;p=lhc%2Fweb%2Fwiklou.git Show Log toolbox link for anon users, fix toolbox on DeletedContribs This will show the 'Log' toolbox link on pages relevant to anonymous users. It also sets the relevant user on Special:DeletedContributions, which fixes the missing toolbox links (e.g. 'User contributions', 'Logs', 'Block user'). Change-Id: Ib51c59acb3656d9c209aeea22c1e00dc21a778db --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 511443f016..702ca7e26d 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1190,12 +1190,10 @@ class SkinTemplate extends Skin { 'href' => self::makeSpecialUrlSubpage( 'Contributions', $rootUser ) ); - if ( $user->isLoggedIn() ) { - $logPage = SpecialPage::getTitleFor( 'Log' ); - $nav_urls['log'] = array( - 'href' => $logPage->getLocalUrl( array( 'user' => $rootUser ) ) - ); - } + $logPage = SpecialPage::getTitleFor( 'Log' ); + $nav_urls['log'] = array( + 'href' => $logPage->getLocalUrl( array( 'user' => $rootUser ) ) + ); if ( $this->getUser()->isAllowed( 'block' ) ) { $nav_urls['blockip'] = array( diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index a6719c853f..40856ca554 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -294,6 +294,7 @@ class DeletedContributionsPage extends SpecialPage { $out->addHTML( $this->getForm( '' ) ); return; } + $this->getSkin()->setRelevantUser( $userObj ); $target = $userObj->getName(); $out->addSubtitle( $this->getSubTitle( $userObj ) );