From 3bc727867b64ac9a4673fe751575c8d36a16307a Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 25 Jul 2010 18:24:29 +0000 Subject: [PATCH] Move double $wgOut globals to the top, remove $wgLang duplicated global. --- includes/specials/SpecialContributions.php | 4 +--- includes/specials/SpecialMovepage.php | 2 +- includes/specials/SpecialNewpages.php | 4 +--- includes/specials/SpecialUserlogin.php | 4 +--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index d960791700..8885909f47 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -380,16 +380,14 @@ class SpecialContributions extends SpecialPage { * @param $type String */ protected function feed( $type ) { - global $wgFeed, $wgFeedClasses, $wgFeedLimit; + global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut; if( !$wgFeed ) { - global $wgOut; $wgOut->addWikiMsg( 'feed-unavailable' ); return; } if( !isset( $wgFeedClasses[$type] ) ) { - global $wgOut; $wgOut->addWikiMsg( 'feed-invalid' ); return; } diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 8fa5ea81e6..450c210975 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -365,7 +365,7 @@ class MovePageForm { # Disallow deletions of big articles $bigHistory = $article->isBigDeletion(); if( $bigHistory && !$nt->userCan( 'bigdelete' ) ) { - global $wgLang, $wgDeleteRevisionsLimit; + global $wgDeleteRevisionsLimit; $this->showForm( array('delete-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ) ); return; } diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 125a8b20d6..e0bd30920a 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -325,16 +325,14 @@ class SpecialNewpages extends IncludableSpecialPage { * @param $type String */ protected function feed( $type ) { - global $wgFeed, $wgFeedClasses, $wgFeedLimit; + global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut; if ( !$wgFeed ) { - global $wgOut; $wgOut->addWikiMsg( 'feed-unavailable' ); return; } if( !isset( $wgFeedClasses[$type] ) ) { - global $wgOut; $wgOut->addWikiMsg( 'feed-invalid' ); return; } diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index ecabb9f6de..c2f42799ea 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -182,7 +182,7 @@ class LoginForm { * @private */ function addNewAccount() { - global $wgUser, $wgEmailAuthentication; + global $wgUser, $wgEmailAuthentication, $wgOut; # Create the account and abort if there's a problem doing so $u = $this->addNewAccountInternal(); @@ -197,7 +197,6 @@ class LoginForm { # Send out an email authentication message if needed if( $wgEmailAuthentication && User::isValidEmailAddr( $u->getEmail() ) ) { - global $wgOut; $error = $u->sendConfirmationMail(); if( WikiError::isError( $error ) ) { $wgOut->addWikiMsg( 'confirmemail_sendfailed', $error->getMessage() ); @@ -224,7 +223,6 @@ class LoginForm { } } else { # Confirm that the account was created - global $wgOut; $self = SpecialPage::getTitleFor( 'Userlogin' ); $wgOut->setPageTitle( wfMsgHtml( 'accountcreated' ) ); $wgOut->setArticleRelated( false ); -- 2.20.1