Index: trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php |
— | — | @@ -226,22 +226,24 @@ |
227 | 227 | } |
228 | 228 | wfProfileIn( __METHOD__ ); |
229 | 229 | |
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 ); |
234 | 236 | } |
235 | 237 | $skinFiles = self::tryForKey( |
236 | 238 | self::collateFilePathListByOption( $this->skinStyles, 'media', 'all' ), $context->getSkin(), 'default' |
237 | 239 | ); |
238 | 240 | foreach ( $skinFiles as $styleFiles ) { |
239 | | - $styles = array_merge( $styles, $styleFiles ); |
| 241 | + $files = array_merge( $files, $styleFiles ); |
240 | 242 | } |
241 | 243 | |
242 | 244 | // Final merge, this should result in a master list of dependent files |
243 | 245 | $files = array_merge( |
| 246 | + $files, |
244 | 247 | $this->scripts, |
245 | | - $styles, |
246 | 248 | $context->getDebug() ? $this->debugScripts : array(), |
247 | 249 | self::tryForKey( $this->languageScripts, $context->getLanguage() ), |
248 | 250 | self::tryForKey( $this->skinScripts, $context->getSkin(), 'default' ), |