From: Alexandre Emsenhuber Date: Thu, 23 Apr 2009 20:07:18 +0000 (+0000) Subject: Get the 'action' URL parameter from $wgRequest rather than from the $action global... X-Git-Tag: 1.31.0-rc.0~42066 X-Git-Url: http://git.cyclocoop.org/%27%20.generer_url_ecrire%28_request%28%27exec%27%29%2C%27cmd=switch&outil=rss_couteau_suisse%27%29.%27?a=commitdiff_plain;h=526ed39e6499a32a597e1b28e96ada2d2d2e8c1a;p=lhc%2Fweb%2Fwiklou.git Get the 'action' URL parameter from $wgRequest rather than from the $action global variable --- 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 {