From: Trevor Parscal Date: Fri, 10 Sep 2010 20:55:28 +0000 (+0000) Subject: Adjusted comments X-Git-Tag: 1.31.0-rc.0~35035 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=0b1b7165046da33c6d87331a8cd317307af5c939;p=lhc%2Fweb%2Fwiklou.git Adjusted comments --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 13b436f9a1..d91fb3f8f0 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2313,10 +2313,11 @@ class OutputPage { // Statup - this will immediately load jquery and mediawiki modules $scripts = self::makeResourceLoaderLink( $sk, 'startup', 'scripts' ); - // Configuration + // Configuration -- this could be merged together with the load and go, but makeGlobalVariablesScript returns a + // whole script tag -- grumble grumble $scripts .= Skin::makeGlobalVariablesScript( $sk->getSkinName() ) . "\n"; - // Support individual script requests in debug mode + // Script and Messages "only" if ( $wgRequest->getBool( 'debug' ) && $wgRequest->getVal( 'debug' ) !== 'false' ) { // Scripts foreach ( $this->getModuleScripts() as $name ) { @@ -2336,8 +2337,9 @@ class OutputPage { $scripts .= self::makeResourceLoaderLink( $sk, $this->getModuleMessages(), 'messages' ); } } + + // Modules - let the client calculate dependencies and batch requests as it likes if ( $this->getModules() ) { - // Modules - let the client calculate dependencies and batch requests as it likes $modules = FormatJson::encode( $this->getModules() ); $scripts .= Html::inlineScript( "if ( mediaWiki !== undefined ) { mediaWiki.loader.load( {$modules} ); mediaWiki.loader.go(); }"