r72065 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72064‎ | r72065 | r72066 >
Date:23:36, 31 August 2010
Author:catrope
Status:deferred
Tags:
Comment:
resourceloader: Put modification timestamp in registration data
Modified paths:
  • /branches/resourceloader/phase3/includes/ResourceLoader.php (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/includes/ResourceLoader.php
@@ -115,7 +115,7 @@
116116 /**
117117 * Gets registration code for all modules, except pre-registered ones listed in self::$preRegisteredModules
118118 *
119 - * @return {string} JavaScript code for registereing all modules with client loader
 119+ * @return {string} JavaScript code for registering all modules with the client loader
120120 */
121121 public static function getModuleRegistrations() {
122122 $scripts = '';
@@ -130,11 +130,11 @@
131131 else {
132132 // Modules without dependencies pass one argument (name) to mediaWiki.loader.register()
133133 if ( !count( $module->getDependencies() ) ) {
134 - $registrations[] = $name;
 134+ $registrations[] = array( $name, $module->getModifiedTime() );
135135 }
136136 // Modules with dependencies pass two arguments (name, dependencies) to mediaWiki.loader.register()
137137 else {
138 - $registrations[] = array( $name, $module->getDependencies() );
 138+ $registrations[] = array( $name, $module->getModifiedTime(), $module->getDependencies() );
139139 }
140140 }
141141 }

Status & tagging log