r79900 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79899‎ | r79900 | r79901 >
Date:16:24, 9 January 2011
Author:catrope
Status:ok
Tags:
Comment:
Fix bug in ResourceLoader causing LTR->RTL flipping to only be applied to the first CSS file of every module. Thanks to thedj for reporting and investigating this bug and to Nikerabbit for finding the culprit (bad use of array_map)
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php
@@ -464,12 +464,13 @@
465465 }
466466 $styles = self::collateFilePathListByOption( $styles, 'media', 'all' );
467467 foreach ( $styles as $media => $files ) {
 468+ $uniqueFiles = array_unique( $files );
468469 $styles[$media] = implode(
469470 "\n",
470471 array_map(
471472 array( $this, 'readStyleFile' ),
472 - array_unique( $files ),
473 - array( $flip )
 473+ $uniqueFiles,
 474+ array_fill( 0, count( $uniqueFiles ), $flip )
474475 )
475476 );
476477 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r805261.17: MFT r78232, r78253, r79722, r79732, r79785, r79817, r79864, r79891, r79...catrope22:19, 18 January 2011

Status & tagging log