r49782 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49781‎ | r49782 | r49783 >
Date:20:07, 23 April 2009
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Get the 'action' URL parameter from $wgRequest rather than from the $action global variable
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -1013,10 +1013,13 @@
10141014 }
10151015
10161016 function getUndeleteLink() {
1017 - global $wgUser, $wgContLang, $wgLang, $action;
1018 - if( $wgUser->isAllowed( 'deletedhistory' ) &&
1019 - ( ( $this->mTitle->getArticleId() == 0 ) || ( $action == 'history' ) ) &&
1020 - ( $n = $this->mTitle->isDeleted() ) ){
 1017+ global $wgUser, $wgContLang, $wgLang, $wgRequest;
 1018+
 1019+ $action = $wgRequest->getVal( 'action', 'view' );
 1020+
 1021+ if ( $wgUser->isAllowed( 'deletedhistory' ) &&
 1022+ ( $this->mTitle->getArticleId() == 0 || $action == 'history' ) &&
 1023+ $n = $this->mTitle->isDeleted() ) {
10211024 if ( $wgUser->isAllowed( 'undelete' ) ) {
10221025 $msg = 'thisisdeleted';
10231026 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r51124Per Tim's comment on r49782 (and fix for that rev): put the $n assignment out...ialex17:15, 28 May 2009

Comments

#Comment by Tim Starling (talk | contribs)   08:18, 27 May 2009

Why did you remove the brackets around that assignment? And why didn't you move the assignment out of the condition altogether while you had the chance?

#Comment by IAlex (talk | contribs)   17:16, 28 May 2009

fixed in r51124.

Status & tagging log