Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2588,15 +2588,19 @@ |
2589 | 2589 | } |
2590 | 2590 | } |
2591 | 2591 | |
2592 | | - // Split the styles into two groups, not user (0) and user (1) |
2593 | | - $styles = array( array(), array() ); |
| 2592 | + // Split the styles into three groups |
| 2593 | + $styles = array( 'other' => array(), 'user' => array(), 'site' => array() ); |
2594 | 2594 | $resourceLoader = $this->getResourceLoader(); |
2595 | 2595 | foreach ( $this->getModuleStyles() as $name ) { |
2596 | | - $styles[$resourceLoader->getModule( $name )->getGroup() === 'user' ? 1 : 0][] = $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; |
2597 | 2600 | } |
2598 | 2601 | // Add styles to tags, user modules last |
2599 | | - $tags[] = $this->makeResourceLoaderLink( $sk, $styles[0], 'styles' ); |
2600 | | - $tags[] = $this->makeResourceLoaderLink( $sk, $styles[1], 'styles' ); |
| 2602 | + $tags[] = $this->makeResourceLoaderLink( |
| 2603 | + $sk, array_merge( $styles['other'], $styles['site'], $styles['user'] ), 'styles' |
| 2604 | + ); |
2601 | 2605 | return implode( "\n", $tags ); |
2602 | 2606 | } |
2603 | 2607 | |