From: Platonides Date: Sun, 25 Jul 2010 18:24:29 +0000 (+0000) Subject: Move double $wgOut globals to the top, remove $wgLang duplicated global. X-Git-Tag: 1.31.0-rc.0~35940 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=3bc727867b64ac9a4673fe751575c8d36a16307a;p=lhc%2Fweb%2Fwiklou.git Move double $wgOut globals to the top, remove $wgLang duplicated global. --- 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 );