Index: branches/resourceloader/phase3/includes/OutputPage.php |
— | — | @@ -2218,7 +2218,7 @@ |
2219 | 2219 | $ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . "\n"; |
2220 | 2220 | |
2221 | 2221 | $ret .= implode( "\n", array( |
2222 | | - $this->getHeadLinks(), |
| 2222 | + $this->getHeadLinks( $sk ), |
2223 | 2223 | $this->buildCssLinks(), |
2224 | 2224 | $this->getHeadItems(), |
2225 | 2225 | ) ); |
— | — | @@ -2408,7 +2408,7 @@ |
2409 | 2409 | * @return string HTML tag links to be put in the header. |
2410 | 2410 | */ |
2411 | 2411 | public function getHeadLinks() { |
2412 | | - global $wgFeed; |
| 2412 | + global $wgFeed, $wgRequest; |
2413 | 2413 | |
2414 | 2414 | // Ideally this should happen earlier, somewhere. :P |
2415 | 2415 | $this->addDefaultMeta(); |
— | — | @@ -2478,6 +2478,17 @@ |
2479 | 2479 | } |
2480 | 2480 | } |
2481 | 2481 | |
| 2482 | + // Support individual script requests in debug mode |
| 2483 | + if ( $wgRequest->getBool( 'debug' ) && $wgRequest->getVal( 'debug' ) !== 'false' ) { |
| 2484 | + foreach ( $this->getModuleStyles() as $name ) { |
| 2485 | + $tags .= self::makeResourceLoaderLink( $sk, $name, 'styles' ); |
| 2486 | + } |
| 2487 | + } else { |
| 2488 | + if ( count( $this->getModuleStyles() ) ) { |
| 2489 | + $tags .= self::makeResourceLoaderLink( $sk, $this->getModuleStyles(), 'styles' ); |
| 2490 | + } |
| 2491 | + } |
| 2492 | + |
2482 | 2493 | return implode( "\n", $tags ); |
2483 | 2494 | } |
2484 | 2495 | |