http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72224

Revision: 72224
Author:   tparscal
Date:     2010-09-02 20:32:30 +0000 (Thu, 02 Sep 2010)

Log Message:
-----------
Moved sitejs inclusion to the bottom of the body

Modified Paths:
--------------
    branches/resourceloader/phase3/includes/OutputPage.php

Modified: branches/resourceloader/phase3/includes/OutputPage.php
===================================================================
--- branches/resourceloader/phase3/includes/OutputPage.php      2010-09-02 
20:17:01 UTC (rev 72223)
+++ branches/resourceloader/phase3/includes/OutputPage.php      2010-09-02 
20:32:30 UTC (rev 72224)
@@ -1606,12 +1606,6 @@
                // Add base resources
                $this->addModules( array( 'mediawiki.legacy.wikibits' ) );
                
-               // Add site JS if enabled
-               global $wgUseSiteJs;
-               if ( $wgUseSiteJs ) {
-                       $this->addModuleScripts( 'sitejs' );
-               }
-
                // Add various resources if required
                if ( $wgUseAjax ) {
                        $this->addModules( 'mediawiki.legacy.ajax' );
@@ -2307,7 +2301,7 @@
         */
        function getHeadScripts( Skin $sk ) {
                global $wgUser, $wgRequest, $wgJsMimeType;
-               global $wgStylePath, $wgStyleVersion;
+               global $wgStylePath, $wgStyleVersion, $wgUseSiteJs;
                
                // Statup - this will immediately load jquery and mediawiki 
modules
                $scripts = self::makeResourceLoaderLink( $sk, 'startup', 
'scripts' );
@@ -2369,6 +2363,11 @@
                $scripts .= "\n" . $this->mScripts;
                // This should be at the bottom of the body - below ALL other 
scripts
                $scripts .= Html::inlineScript( "if ( mediaWiki !== undefined ) 
{ mediaWiki.loader.go(); }" );
+               // Add site JS if enabled
+               if ( $wgUseSiteJs ) {
+                       $scripts .= self::makeResourceLoaderLink( $sk, 
'sitejs', 'scripts' );
+               }
+               
                return $scripts;
        }
 



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to