From 526ed39e6499a32a597e1b28e96ada2d2d2e8c1a Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 23 Apr 2009 20:07:18 +0000 Subject: [PATCH] Get the 'action' URL parameter from $wgRequest rather than from the $action global variable --- includes/Skin.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 096227efce..79cf3f3cd3 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1013,10 +1013,13 @@ END; } function getUndeleteLink() { - global $wgUser, $wgContLang, $wgLang, $action; - if( $wgUser->isAllowed( 'deletedhistory' ) && - ( ( $this->mTitle->getArticleId() == 0 ) || ( $action == 'history' ) ) && - ( $n = $this->mTitle->isDeleted() ) ){ + global $wgUser, $wgContLang, $wgLang, $wgRequest; + + $action = $wgRequest->getVal( 'action', 'view' ); + + if ( $wgUser->isAllowed( 'deletedhistory' ) && + ( $this->mTitle->getArticleId() == 0 || $action == 'history' ) && + $n = $this->mTitle->isDeleted() ) { if ( $wgUser->isAllowed( 'undelete' ) ) { $msg = 'thisisdeleted'; } else { -- 2.20.1