r87453 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87452‎ | r87453 | r87454 >
Date:20:58, 4 May 2011
Author:krinkle
Status:ok
Tags:
Comment:
mw.loader fixes
* Renaming locally declared function "request" to "getScriptTag" to avoid confusion or conflict with the other local "request" function inside the mw.loader closure
* (bug 26804) Code clean up ($skin was generated locally already)
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoader.php (modified) (history)
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoader.php
@@ -63,7 +63,7 @@
6464 // Get file dependency information
6565 $res = $dbr->select( 'module_deps', array( 'md_module', 'md_deps' ), array(
6666 'md_module' => $modules,
67 - 'md_skin' => $context->getSkin()
 67+ 'md_skin' => $skin
6868 ), __METHOD__
6969 );
7070
Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -956,7 +956,7 @@
957957 // include modules which are already loaded
958958 batch = [];
959959 // Asynchronously append a script tag to the end of the body
960 - function request() {
 960+ function getScriptTag() {
961961 var html = '';
962962 for ( var r = 0; r < requests.length; r++ ) {
963963 requests[r] = sortQuery( requests[r] );
@@ -969,9 +969,9 @@
970970 }
971971 // Load asynchronously after documument ready
972972 if ( ready ) {
973 - setTimeout( function() { $( 'body' ).append( request() ); }, 0 );
 973+ setTimeout( function() { $( 'body' ).append( getScriptTag() ); }, 0 );
974974 } else {
975 - document.write( request() );
 975+ document.write( getScriptTag() );
976976 }
977977 }
978978 };

Status & tagging log