From a5e55f2341d5013f1071d0da0c9548e0da725aac Mon Sep 17 00:00:00 2001 From: umherirrender Date: Tue, 4 Nov 2014 20:11:51 +0100 Subject: [PATCH] Simplify Special:Undelete link from navigation Special:Undelete accept the page to undelete as sub page, no need to use the target url param. Change-Id: I02bb32478d1bf04c0e33f91a4acb1765277b054e --- includes/skins/SkinTemplate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 6c72703c79..3a39fee873 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -1004,7 +1004,7 @@ class SkinTemplate extends Skin { if ( $user->isAllowed( 'deletedhistory' ) ) { $n = $title->isDeleted(); if ( $n ) { - $undelTitle = SpecialPage::getTitleFor( 'Undelete' ); + $undelTitle = SpecialPage::getTitleFor( 'Undelete', $title->getPrefixedDBkey() ); // If the user can't undelete but can view deleted // history show them a "View .. deleted" tab instead. $msgKey = $user->isAllowed( 'undelete' ) ? 'undelete' : 'viewdeleted'; @@ -1012,7 +1012,7 @@ class SkinTemplate extends Skin { 'class' => $this->getTitle()->isSpecial( 'Undelete' ) ? 'selected' : false, 'text' => wfMessageFallback( "$skname-action-$msgKey", "{$msgKey}_short" ) ->setContext( $this->getContext() )->numParams( $n )->text(), - 'href' => $undelTitle->getLocalURL( array( 'target' => $title->getPrefixedDBkey() ) ) + 'href' => $undelTitle->getLocalURL() ); } } -- 2.20.1