r71216 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71215‎ | r71216 | r71217 >
Date:22:00, 17 August 2010
Author:tparscal
Status:ok
Tags:
Comment:
Added handling for debug mode
Modified paths:
  • /branches/resourceloader/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/includes/OutputPage.php
@@ -2249,9 +2249,17 @@
22502250 $scripts = '';
22512251 // Include base modules and wikibits legacy code
22522252 if ( $wgRequest->getVal( 'debug' ) === 'true' || $wgRequest->getBool( 'debug' ) ) {
2253 - foreach ( $this->getResources() as $resource ) {
2254 - $scripts .= self::makeResourceLoaderLinkedScript( $sk, $resource );
 2253+ $skipped = array();
 2254+ foreach ( $this->getResources() as $name ) {
 2255+ $module = ResourceLoader::getModule( $name );
 2256+ if ( $module->isRaw() ) {
 2257+ $scripts .= self::makeResourceLoaderLinkedScript( $sk, $name );
 2258+ $skipped[] = $name;
 2259+ }
22552260 }
 2261+ foreach ( $skipped as $name ) {
 2262+ $scripts .= self::makeResourceLoaderLinkedScript( $sk, $name );
 2263+ }
22562264 } else {
22572265 $scripts .= self::makeResourceLoaderLinkedScript( $sk, $this->getResources() );
22582266 }

Status & tagging log