Merged load and go. At least for now, this seems to make sense.
authorTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 10 Sep 2010 20:45:58 +0000 (20:45 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Fri, 10 Sep 2010 20:45:58 +0000 (20:45 +0000)
includes/OutputPage.php

index e502f1b..13b436f 100644 (file)
@@ -2340,13 +2340,10 @@ class OutputPage {
                        // 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} ); }"
+                               "if ( mediaWiki !== undefined ) { mediaWiki.loader.load( {$modules} ); mediaWiki.loader.go(); }"
                        );
                }
                
-               // Add code to fetch all requested modules
-               $scripts .= Html::inlineScript( "if ( mediaWiki !== undefined ) { mediaWiki.loader.go(); }" );
-               
                // TODO: User Scripts should be included using the resource loader
                // Add user JS if enabled
                if( $this->isUserJsAllowed() && $wgUser->isLoggedIn() ) {