Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2231,8 +2231,8 @@ |
2232 | 2232 | $ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n"; |
2233 | 2233 | |
2234 | 2234 | $ret .= implode( "\n", array( |
2235 | | - $this->getHeadLinks( $sk ), |
2236 | | - $this->buildCssLinks(), |
| 2235 | + $this->getHeadLinks(), |
| 2236 | + $this->buildCssLinks( $sk ), |
2237 | 2237 | $this->getHeadItems(), |
2238 | 2238 | ) ); |
2239 | 2239 | if ( $sk->usercss ) { |
— | — | @@ -2517,7 +2517,7 @@ |
2518 | 2518 | /** |
2519 | 2519 | * @return string HTML tag links to be put in the header. |
2520 | 2520 | */ |
2521 | | - public function getHeadLinks( Skin $sk ) { |
| 2521 | + public function getHeadLinks() { |
2522 | 2522 | global $wgFeed; |
2523 | 2523 | |
2524 | 2524 | // Ideally this should happen earlier, somewhere. :P |
— | — | @@ -2588,19 +2588,6 @@ |
2589 | 2589 | } |
2590 | 2590 | } |
2591 | 2591 | |
2592 | | - // Split the styles into three groups |
2593 | | - $styles = array( 'other' => array(), 'user' => array(), 'site' => array() ); |
2594 | | - $resourceLoader = $this->getResourceLoader(); |
2595 | | - foreach ( $this->getModuleStyles() as $name ) { |
2596 | | - $group = $resourceLoader->getModule( $name )->getGroup(); |
2597 | | - // Modules in groups named "other" or anything different than "user" or "site" will |
2598 | | - // be placed in the "other" group |
2599 | | - $styles[isset( $style[$group] ) ? $group : 'other'][] = $name; |
2600 | | - } |
2601 | | - // Add styles to tags, user modules last |
2602 | | - $tags[] = $this->makeResourceLoaderLink( |
2603 | | - $sk, array_merge( $styles['other'], $styles['site'], $styles['user'] ), 'styles' |
2604 | | - ); |
2605 | 2592 | return implode( "\n", $tags ); |
2606 | 2593 | } |
2607 | 2594 | |
— | — | @@ -2658,8 +2645,23 @@ |
2659 | 2646 | * Build a set of <link>s for the stylesheets specified in the $this->styles array. |
2660 | 2647 | * These will be applied to various media & IE conditionals. |
2661 | 2648 | */ |
2662 | | - public function buildCssLinks() { |
2663 | | - return implode( "\n", $this->buildCssLinksArray() ); |
| 2649 | + public function buildCssLinks( $sk ) { |
| 2650 | + // Split the styles into three groups |
| 2651 | + $styles = array( 'other' => array(), 'user' => array(), 'site' => array() ); |
| 2652 | + $resourceLoader = $this->getResourceLoader(); |
| 2653 | + foreach ( $this->getModuleStyles() as $name ) { |
| 2654 | + $group = $resourceLoader->getModule( $name )->getGroup(); |
| 2655 | + // Modules in groups named "other" or anything different than "user" or "site" will |
| 2656 | + // be placed in the "other" group |
| 2657 | + $styles[isset( $style[$group] ) ? $group : 'other'][] = $name; |
| 2658 | + } |
| 2659 | + // Add tags created using legacy methods |
| 2660 | + $tags = $this->buildCssLinksArray(); |
| 2661 | + // Add ResourceLoader module style tags |
| 2662 | + $tags[] = $this->makeResourceLoaderLink( |
| 2663 | + $sk, array_merge( $styles['other'], $styles['site'], $styles['user'] ), 'styles' |
| 2664 | + ); |
| 2665 | + return implode( "\n", $tags ); |
2664 | 2666 | } |
2665 | 2667 | |
2666 | 2668 | public function buildCssLinksArray() { |