Fix bug in ResourceLoader causing LTR->RTL flipping to only be applied to the first...
authorRoan Kattouw <catrope@users.mediawiki.org>
Sun, 9 Jan 2011 16:24:09 +0000 (16:24 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sun, 9 Jan 2011 16:24:09 +0000 (16:24 +0000)
includes/resourceloader/ResourceLoaderFileModule.php

index e17a848..d39cd46 100644 (file)
@@ -464,12 +464,13 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                }
                $styles = self::collateFilePathListByOption( $styles, 'media', 'all' );
                foreach ( $styles as $media => $files ) {
+                       $uniqueFiles = array_unique( $files );
                        $styles[$media] = implode(
                                "\n",
                                array_map(
                                        array( $this, 'readStyleFile' ),
-                                       array_unique( $files ),
-                                       array( $flip )
+                                       $uniqueFiles,
+                                       array_fill( 0, count( $uniqueFiles ), $flip )
                                )
                        );
                }