r75059 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75058‎ | r75059 | r75060 >
Date:23:47, 19 October 2010
Author:tparscal
Status:ok
Tags:
Comment:
Some cleanup work
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php
@@ -226,22 +226,24 @@
227227 }
228228 wfProfileIn( __METHOD__ );
229229
230 - // Sort of nasty way we can get a flat list of files depended on by all styles
231 - $styles = array();
232 - foreach ( self::collateFilePathListByOption( $this->styles, 'media', 'all' ) as $styleFiles ) {
233 - $styles = array_merge( $styles, $styleFiles );
 230+ $files = array();
 231+
 232+ // Flatten style files into $files
 233+ $styles = self::collateFilePathListByOption( $this->styles, 'media', 'all' );
 234+ foreach ( $styles as $styleFiles ) {
 235+ $files = array_merge( $files, $styleFiles );
234236 }
235237 $skinFiles = self::tryForKey(
236238 self::collateFilePathListByOption( $this->skinStyles, 'media', 'all' ), $context->getSkin(), 'default'
237239 );
238240 foreach ( $skinFiles as $styleFiles ) {
239 - $styles = array_merge( $styles, $styleFiles );
 241+ $files = array_merge( $files, $styleFiles );
240242 }
241243
242244 // Final merge, this should result in a master list of dependent files
243245 $files = array_merge(
 246+ $files,
244247 $this->scripts,
245 - $styles,
246248 $context->getDebug() ? $this->debugScripts : array(),
247249 self::tryForKey( $this->languageScripts, $context->getLanguage() ),
248250 self::tryForKey( $this->skinScripts, $context->getSkin(), 'default' ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r75861merges from trunk -r75059:75821neilk17:54, 2 November 2010

Status & tagging log