Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2436,11 +2436,10 @@ |
2437 | 2437 | |
2438 | 2438 | // Modules requests - let the client calculate dependencies and batch requests as it likes |
2439 | 2439 | if ( $this->getModules() ) { |
2440 | | - $modules = FormatJson::encode( ); |
2441 | 2440 | $scripts .= Html::inlineScript( |
2442 | 2441 | ResourceLoader::makeLoaderConditionalScript( |
2443 | | - Xml::encodeJsCall( 'mediaWiki.loader.load', $this->getModules() ) . |
2444 | | - Xml::encodeJsCall( 'mediaWiki.loader.go' ) |
| 2442 | + Xml::encodeJsCall( 'mediaWiki.loader.load', array( $this->getModules() ) ) . |
| 2443 | + Xml::encodeJsCall( 'mediaWiki.loader.go', array() ) |
2445 | 2444 | ) |
2446 | 2445 | ) . "\n"; |
2447 | 2446 | } |
— | — | @@ -2588,15 +2587,16 @@ |
2589 | 2588 | } |
2590 | 2589 | } |
2591 | 2590 | } |
2592 | | - |
2593 | | - // Add styles to tags, pushing user modules to the end |
| 2591 | + |
| 2592 | + // Split the styles into two groups, not user (0) and user (1) |
2594 | 2593 | $styles = array( array(), array() ); |
2595 | | - foreach ( $this->getModuleStyles() as $module ) { |
2596 | | - $styles[strpos( 'user', $module ) === 0 ? 1 : 0][] = $module; |
| 2594 | + $resourceLoader = $this->getResourceLoader(); |
| 2595 | + foreach ( $this->getModuleStyles() as $name ) { |
| 2596 | + $styles[$resourceLoader->getModule( $name )->getGroup() === 'user' ? 1 : 0][] = $name; |
2597 | 2597 | } |
| 2598 | + // Add styles to tags, user modules last |
2598 | 2599 | $tags[] = $this->makeResourceLoaderLink( $sk, $styles[0], 'styles' ); |
2599 | 2600 | $tags[] = $this->makeResourceLoaderLink( $sk, $styles[1], 'styles' ); |
2600 | | - |
2601 | 2601 | return implode( "\n", $tags ); |
2602 | 2602 | } |
2603 | 2603 | |