$rl = $mainContext->getResourceLoader();
$chunks = [];
+ // Sort module names so requests are more uniform
+ sort( $modules );
+
if ( $mainContext->getDebug() && count( $modules ) > 1 ) {
+
$chunks = [];
// Recursively call us for every item
foreach ( $modules as $name ) {
return new WrappedStringList( "\n", $chunks );
}
- // Sort module names so requests are more uniform
- sort( $modules );
// Create keyed-by-source and then keyed-by-group list of module objects from modules list
$sortedModules = [];
foreach ( $modules as $name ) {
'context' => [ 'debug' => true ],
'modules' => [ 'test.styles.pure', 'test.styles.mixed' ],
'only' => ResourceLoaderModule::TYPE_STYLES,
- 'output' => '<link rel="stylesheet" href="/w/load.php?debug=true&lang=nl&modules=test.styles.pure&only=styles&skin=fallback"/>' . "\n"
- . '<link rel="stylesheet" href="/w/load.php?debug=true&lang=nl&modules=test.styles.mixed&only=styles&skin=fallback"/>',
+ 'output' => '<link rel="stylesheet" href="/w/load.php?debug=true&lang=nl&modules=test.styles.mixed&only=styles&skin=fallback"/>' . "\n"
+ . '<link rel="stylesheet" href="/w/load.php?debug=true&lang=nl&modules=test.styles.pure&only=styles&skin=fallback"/>',
+ ],
+ [
+ 'context' => [ 'debug' => false ],
+ 'modules' => [ 'test.styles.pure', 'test.styles.mixed' ],
+ 'only' => ResourceLoaderModule::TYPE_STYLES,
+ 'output' => '<link rel="stylesheet" href="/w/load.php?debug=false&lang=nl&modules=test.styles.mixed%2Cpure&only=styles&skin=fallback"/>',
],
[
'context' => [],