resourceloader: Fix broken 'version' param in mw.loader requests
authorTimo Tijhof <krinklemail@gmail.com>
Sun, 31 May 2015 18:19:34 +0000 (19:19 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Sun, 31 May 2015 18:22:54 +0000 (19:22 +0100)
All requests were using version=da39a3ee5e6b, where da39a3ee5e6b
is the sha1() of the empty string.

Follows-up f37cee996e which incorrectly assummed the local
'modules' variable to hold a list of objects, when in fact it
holds a list of strings.

Change-Id: I717b8657300263606832ff1ec67a34a7163de842

resources/src/mediawiki/mediawiki.js

index f2b4b00..0c24720 100644 (file)
 
                        /**
                         * @since 1.26
-                        * @param {Object[]} modules List of module registry objects
+                        * @param {Array} modules List of module names
                         * @return {string} Hash of concatenated version hashes.
                         */
                        function getCombinedVersion( modules ) {
                                var hashes = $.map( modules, function ( module ) {
-                                       return module.version;
+                                       return registry[module].version;
                                } );
                                // Trim for consistency with server-side ResourceLoader::makeHash. It also helps
                                // save precious space in the limited query string. Otherwise modules are more