From: Alexandre Emsenhuber Date: Thu, 28 May 2009 17:15:58 +0000 (+0000) Subject: Per Tim's comment on r49782 (and fix for that rev): put the $n assignment out of... X-Git-Tag: 1.31.0-rc.0~41620 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=7617e06b6916257b8e05a9ccbe550c02cd978020;p=lhc%2Fweb%2Fwiklou.git Per Tim's comment on r49782 (and fix for that rev): put the $n assignment out of the if clause --- diff --git a/includes/Skin.php b/includes/Skin.php index faad104518..5d73f5b27c 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1018,17 +1018,19 @@ END; $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 { - $msg = 'viewdeleted'; + ( $this->mTitle->getArticleId() == 0 || $action == 'history' ) ) { + $n = $this->mTitle->isDeleted(); + if ( $n ) { + if ( $wgUser->isAllowed( 'undelete' ) ) { + $msg = 'thisisdeleted'; + } else { + $msg = 'viewdeleted'; + } + return wfMsg( $msg, + $this->makeKnownLinkObj( + SpecialPage::getTitleFor( 'Undelete', $this->mTitle->getPrefixedDBkey() ), + wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $wgLang->formatNum( $n ) ) ) ); } - return wfMsg( $msg, - $this->makeKnownLinkObj( - SpecialPage::getTitleFor( 'Undelete', $this->mTitle->getPrefixedDBkey() ), - wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $wgLang->formatNum( $n ) ) ) ); } return ''; }