From: umherirrender Date: Tue, 4 Nov 2014 19:11:51 +0000 (+0100) Subject: Simplify Special:Undelete link from navigation X-Git-Tag: 1.31.0-rc.0~13155^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=a5e55f2341d5013f1071d0da0c9548e0da725aac;p=lhc%2Fweb%2Fwiklou.git 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 --- 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() ); } }