r69890 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69889‎ | r69890 | r69891 >
Date:18:24, 25 July 2010
Author:platonides
Status:ok
Tags:
Comment:
Move double $wgOut globals to the top, remove $wgLang duplicated global.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -325,16 +325,14 @@
326326 * @param $type String
327327 */
328328 protected function feed( $type ) {
329 - global $wgFeed, $wgFeedClasses, $wgFeedLimit;
 329+ global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
330330
331331 if ( !$wgFeed ) {
332 - global $wgOut;
333332 $wgOut->addWikiMsg( 'feed-unavailable' );
334333 return;
335334 }
336335
337336 if( !isset( $wgFeedClasses[$type] ) ) {
338 - global $wgOut;
339337 $wgOut->addWikiMsg( 'feed-invalid' );
340338 return;
341339 }
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -182,7 +182,7 @@
183183 * @private
184184 */
185185 function addNewAccount() {
186 - global $wgUser, $wgEmailAuthentication;
 186+ global $wgUser, $wgEmailAuthentication, $wgOut;
187187
188188 # Create the account and abort if there's a problem doing so
189189 $u = $this->addNewAccountInternal();
@@ -197,7 +197,6 @@
198198
199199 # Send out an email authentication message if needed
200200 if( $wgEmailAuthentication && User::isValidEmailAddr( $u->getEmail() ) ) {
201 - global $wgOut;
202201 $error = $u->sendConfirmationMail();
203202 if( WikiError::isError( $error ) ) {
204203 $wgOut->addWikiMsg( 'confirmemail_sendfailed', $error->getMessage() );
@@ -224,7 +223,6 @@
225224 }
226225 } else {
227226 # Confirm that the account was created
228 - global $wgOut;
229227 $self = SpecialPage::getTitleFor( 'Userlogin' );
230228 $wgOut->setPageTitle( wfMsgHtml( 'accountcreated' ) );
231229 $wgOut->setArticleRelated( false );
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -380,16 +380,14 @@
381381 * @param $type String
382382 */
383383 protected function feed( $type ) {
384 - global $wgFeed, $wgFeedClasses, $wgFeedLimit;
 384+ global $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut;
385385
386386 if( !$wgFeed ) {
387 - global $wgOut;
388387 $wgOut->addWikiMsg( 'feed-unavailable' );
389388 return;
390389 }
391390
392391 if( !isset( $wgFeedClasses[$type] ) ) {
393 - global $wgOut;
394392 $wgOut->addWikiMsg( 'feed-invalid' );
395393 return;
396394 }
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -365,7 +365,7 @@
366366 # Disallow deletions of big articles
367367 $bigHistory = $article->isBigDeletion();
368368 if( $bigHistory && !$nt->userCan( 'bigdelete' ) ) {
369 - global $wgLang, $wgDeleteRevisionsLimit;
 369+ global $wgDeleteRevisionsLimit;
370370 $this->showForm( array('delete-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ) );
371371 return;
372372 }

Status & tagging log