From 0b1b7165046da33c6d87331a8cd317307af5c939 Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Fri, 10 Sep 2010 20:55:28 +0000 Subject: [PATCH] Adjusted comments --- includes/OutputPage.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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(); }" -- 2.20.1