https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112987

Revision: 112987
Author:   krinkle
Date:     2012-03-04 22:56:43 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
[ResourceLoader] Minor clean up
* Re-order special modules and add a few comments
* Single quote in QUnitTestResources.php
* Space in ResourceLoader.php

(Separated from another commit while skimming code)

Modified Paths:
--------------
    trunk/phase3/includes/resourceloader/ResourceLoader.php
    trunk/phase3/resources/Resources.php
    trunk/phase3/tests/qunit/QUnitTestResources.php

Modified: trunk/phase3/includes/resourceloader/ResourceLoader.php
===================================================================
--- trunk/phase3/includes/resourceloader/ResourceLoader.php     2012-03-04 
22:54:09 UTC (rev 112986)
+++ trunk/phase3/includes/resourceloader/ResourceLoader.php     2012-03-04 
22:56:43 UTC (rev 112987)
@@ -980,7 +980,7 @@
         * @return string
         */
        public static function makeLoaderConditionalScript( $script ) {
-               return "if(window.mw){\n".trim( $script )."\n}";
+               return "if(window.mw){\n" . trim( $script ) . "\n}";
        }
 
        /**

Modified: trunk/phase3/resources/Resources.php
===================================================================
--- trunk/phase3/resources/Resources.php        2012-03-04 22:54:09 UTC (rev 
112986)
+++ trunk/phase3/resources/Resources.php        2012-03-04 22:56:43 UTC (rev 
112987)
@@ -4,15 +4,22 @@
 
        /* Special modules who have their own classes */
 
+       // Scripts managed by the local wiki (stored in the MediaWiki namespace)
        'site' => array( 'class' => 'ResourceLoaderSiteModule' ),
        'noscript' => array( 'class' => 'ResourceLoaderNoscriptModule' ),
        'startup' => array( 'class' => 'ResourceLoaderStartUpModule' ),
+       'filepage' => array( 'class' => 'ResourceLoaderFilePageModule' ),
+       'user.groups' => array( 'class' => 'ResourceLoaderUserGroupsModule' ),
+
+       // Scripts managed by the current user (stored in their user space)
        'user' => array( 'class' => 'ResourceLoaderUserModule' ),
-       'user.groups' => array( 'class' => 'ResourceLoaderUserGroupsModule' ),
+
+       // Scripts generated based on the current user's preferences
+       'user.cssprefs' => array( 'class' => 'ResourceLoaderUserCSSPrefsModule' 
),
+
+       // Populate mediawiki.user placeholders with information about the 
current user
        'user.options' => array( 'class' => 'ResourceLoaderUserOptionsModule' ),
-       'user.cssprefs' => array( 'class' => 'ResourceLoaderUserCSSPrefsModule' 
),
        'user.tokens' => array( 'class' => 'ResourceLoaderUserTokensModule' ),
-       'filepage' => array( 'class' => 'ResourceLoaderFilePageModule' ),
 
        /* Skins */
 

Modified: trunk/phase3/tests/qunit/QUnitTestResources.php
===================================================================
--- trunk/phase3/tests/qunit/QUnitTestResources.php     2012-03-04 22:54:09 UTC 
(rev 112986)
+++ trunk/phase3/tests/qunit/QUnitTestResources.php     2012-03-04 22:56:43 UTC 
(rev 112987)
@@ -25,7 +25,7 @@
                        
'tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js',
                        
'tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js',
                        
'tests/qunit/suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js',
-                       
"tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js",
+                       
'tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js',
                ),
                'dependencies' => array(
                        'jquery.autoEllipsis',


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to