r51124 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51123‎ | r51124 | r51125 >
Date:17:15, 28 May 2009
Author:ialex
Status:deferred
Tags:
Comment:
Per Tim's comment on r49782 (and fix for that rev): put the $n assignment out of the if clause
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -1018,17 +1018,19 @@
10191019 $action = $wgRequest->getVal( 'action', 'view' );
10201020
10211021 if ( $wgUser->isAllowed( 'deletedhistory' ) &&
1022 - ( $this->mTitle->getArticleId() == 0 || $action == 'history' ) &&
1023 - $n = $this->mTitle->isDeleted() ) {
1024 - if ( $wgUser->isAllowed( 'undelete' ) ) {
1025 - $msg = 'thisisdeleted';
1026 - } else {
1027 - $msg = 'viewdeleted';
 1022+ ( $this->mTitle->getArticleId() == 0 || $action == 'history' ) ) {
 1023+ $n = $this->mTitle->isDeleted();
 1024+ if ( $n ) {
 1025+ if ( $wgUser->isAllowed( 'undelete' ) ) {
 1026+ $msg = 'thisisdeleted';
 1027+ } else {
 1028+ $msg = 'viewdeleted';
 1029+ }
 1030+ return wfMsg( $msg,
 1031+ $this->makeKnownLinkObj(
 1032+ SpecialPage::getTitleFor( 'Undelete', $this->mTitle->getPrefixedDBkey() ),
 1033+ wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $wgLang->formatNum( $n ) ) ) );
10281034 }
1029 - return wfMsg( $msg,
1030 - $this->makeKnownLinkObj(
1031 - SpecialPage::getTitleFor( 'Undelete', $this->mTitle->getPrefixedDBkey() ),
1032 - wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $wgLang->formatNum( $n ) ) ) );
10331035 }
10341036 return '';
10351037 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r49782Get the 'action' URL parameter from $wgRequest rather than from the $action g...ialex20:07, 23 April 2009

Status & tagging log