r72144 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72143‎ | r72144 | r72145 >
Date:18:40, 1 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Using correct timestamp format for loading jquery|mediawiki through startup
Modified paths:
  • /branches/resourceloader/phase3/includes/ResourceLoader.php (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/includes/ResourceLoader.php
@@ -334,7 +334,20 @@
335335 FormatJson::encode( array( 'server' => $server, 'debug' => $parameters['debug'] ) ) . " );\n";
336336 // Wrap in a closure
337337 $scripts = "window.mediaWikiStartUp = function() {" . $scripts . "};";
338 - $query = wfArrayToCGI( $parameters );
 338+ $query = wfArrayToCGI( $parameters + array( 'version' => wfTimestamp(
 339+ TS_ISO_8601,
 340+ round(
 341+ max(
 342+ self::$modules['jquery']->getModifiedTime(
 343+ $parameters['lang'], $parameters['skin'], $parameters['debug']
 344+ ),
 345+ self::$modules['mediawiki']->getModifiedTime(
 346+ $parameters['lang'], $parameters['skin'], $parameters['debug']
 347+ )
 348+ ),
 349+ -2
 350+ )
 351+ ) ) );
339352 $scripts .= "document.write('<script type=\"text/javascript\" " .
340353 "src=\"{$server}?modules=jquery|mediawiki&{$query}\"></script>');";
341354 }

Status & tagging log