Index: branches/resourceloader/phase3/includes/OutputPage.php |
— | — | @@ -2222,7 +2222,7 @@ |
2223 | 2223 | global $wgUser, $wgLang, $wgRequest, $wgScriptPath; |
2224 | 2224 | // TODO: Should this be a static function of ResourceLoader instead? |
2225 | 2225 | $query = array( |
2226 | | - 'modules' => implode( '|', array_unique( $modules ) ), |
| 2226 | + 'modules' => implode( '|', array_unique( (array) $modules ) ), |
2227 | 2227 | 'user' => $wgUser->isLoggedIn(), |
2228 | 2228 | 'lang' => $wgLang->getCode(), |
2229 | 2229 | 'debug' => ( |
— | — | @@ -2246,8 +2246,15 @@ |
2247 | 2247 | global $wgUser, $wgRequest, $wgJsMimeType; |
2248 | 2248 | global $wgStylePath, $wgStyleVersion; |
2249 | 2249 | |
| 2250 | + $scripts = ''; |
2250 | 2251 | // Include base modules and wikibits legacy code |
2251 | | - $scripts = self::makeResourceLoaderLinkedScript( $sk, $this->getResources() ); |
| 2252 | + if ( $wgRequest->getVal( 'debug' ) === 'true' || $wgRequest->getBool( 'debug' ) ) { |
| 2253 | + foreach ( $this->getResources() as $resource ) { |
| 2254 | + $scripts .= self::makeResourceLoaderLinkedScript( $sk, $resource ); |
| 2255 | + } |
| 2256 | + } else { |
| 2257 | + $scripts .= self::makeResourceLoaderLinkedScript( $sk, $this->getResources() ); |
| 2258 | + } |
2252 | 2259 | // Configure page |
2253 | 2260 | $scripts .= Skin::makeGlobalVariablesScript( $sk->getSkinName() ) . "\n"; |
2254 | 2261 | |