r74140 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74139‎ | r74140 | r74141 >
Date:13:45, 2 October 2010
Author:ialex
Status:ok
Tags:
Comment:
Removed trailing whitespaces
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1610,10 +1610,10 @@
16111611 }
16121612
16131613 $sk = $wgUser->getSkin();
1614 -
 1614+
16151615 // Add base resources
16161616 $this->addModules( array( 'mediawiki.legacy.wikibits' ) );
1617 -
 1617+
16181618 // Add various resources if required
16191619 if ( $wgUseAjax ) {
16201620 $this->addModules( 'mediawiki.legacy.ajax' );
@@ -2280,7 +2280,7 @@
22812281
22822282 return $ret;
22832283 }
2284 -
 2284+
22852285 // TODO: Document
22862286 protected function makeResourceLoaderLink( $skin, $modules, $only, $useESI = false ) {
22872287 global $wgUser, $wgLang, $wgRequest, $wgLoadScript, $wgResourceLoaderDebug, $wgResourceLoaderUseESI,
@@ -2350,7 +2350,7 @@
23512351 }
23522352 // Make queries uniform in order
23532353 ksort( $query );
2354 -
 2354+
23552355 $url = wfAppendQuery( $wgLoadScript, $query );
23562356 if ( $useESI && $wgResourceLoaderUseESI ) {
23572357 $esi = Xml::element( 'esi:include', array( 'src' => $url ) );
@@ -2370,7 +2370,7 @@
23712371 }
23722372 return $links;
23732373 }
2374 -
 2374+
23752375 /**
23762376 * Gets the global variables and mScripts; also adds userjs to the end if
23772377 * enabled. Despite the name, these scripts are no longer put in the
@@ -2381,14 +2381,14 @@
23822382 */
23832383 function getHeadScripts( Skin $sk ) {
23842384 global $wgUser, $wgRequest, $wgUseSiteJs, $wgResourceLoaderDebug;
2385 -
 2385+
23862386 // Startup - this will immediately load jquery and mediawiki modules
23872387 $scripts = $this->makeResourceLoaderLink( $sk, 'startup', 'scripts', true );
2388 -
 2388+
23892389 // Configuration -- This could be merged together with the load and go, but makeGlobalVariablesScript returns a
23902390 // whole script tag -- grumble grumble...
23912391 $scripts .= Skin::makeGlobalVariablesScript( $sk->getSkinName() ) . "\n";
2392 -
 2392+
23932393 // Script and Messages "only"
23942394 if ( $wgRequest->getFuzzyBool( 'debug', $wgResourceLoaderDebug ) ) {
23952395 // Scripts
@@ -2409,7 +2409,7 @@
24102410 $scripts .= $this->makeResourceLoaderLink( $sk, $this->getModuleMessages(), 'messages' );
24112411 }
24122412 }
2413 -
 2413+
24142414 // Modules - let the client calculate dependencies and batch requests as it likes
24152415 if ( $this->getModules() ) {
24162416 $modules = FormatJson::encode( $this->getModules() );
@@ -2417,7 +2417,7 @@
24182418 "if ( window.mediaWiki ) { mediaWiki.loader.load( {$modules} ); mediaWiki.loader.go(); }"
24192419 ) . "\n";
24202420 }
2421 -
 2421+
24222422 // Add user JS if enabled - trying to load user.options as a bundle if possible
24232423 $userOptionsAdded = false;
24242424 if ( $this->isUserJsAllowed() && $wgUser->isLoggedIn() ) {
@@ -2434,12 +2434,12 @@
24352435 $scripts .= $this->makeResourceLoaderLink( $sk, 'user.options', 'scripts' );
24362436 }
24372437 $scripts .= "\n" . $this->mScripts;
2438 -
 2438+
24392439 // Add site JS if enabled
24402440 if ( $wgUseSiteJs ) {
24412441 $scripts .= $this->makeResourceLoaderLink( $sk, 'site', 'scripts' );
24422442 }
2443 -
 2443+
24442444 return $scripts;
24452445 }
24462446
@@ -2568,7 +2568,7 @@
25692569 $tags[] = $this->makeResourceLoaderLink( $sk, $this->getModuleStyles(), 'styles' );
25702570 }
25712571 }
2572 -
 2572+
25732573 return implode( "\n", $tags );
25742574 }
25752575

Status & tagging log