r113277 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113276‎ | r113277 | r113278 >
Date:19:33, 7 March 2012
Author:catrope
Status:ok (Comments)
Tags:
Comment:
(bug 35036) Wikipage-based ResourceLoader modules were not automatically purged as they should be when one of their messages changed. In practice, this only affected WikiLove.

Also adding a documentation comment in ResourceLoaderModule to clarify that it is the subclass's responsibility to make sure message blob timestamps are taken into account
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderModule.php (modified) (history)
  • /trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -295,6 +295,8 @@
296296 calling action=purge&forcelinkupdate.
297297 * (bug 34377) action=watch now parses messages using the correct title instead
298298 of "API".
 299+* (bug 35036) WikiLove messages were not automatically updated in JavaScript
 300+ after having been changed on-wiki due to a bug in core
299301
300302 === Languages updated in 1.19 ===
301303
Index: trunk/phase3/includes/resourceloader/ResourceLoaderModule.php
@@ -357,6 +357,10 @@
358358 * timestamps. Whenever anything happens that changes the module's
359359 * contents for these parameters, the mtime should increase.
360360 *
 361+ * NOTE: The mtime of the module's messages is NOT automatically included.
 362+ * If you want this to happen, you'll need to call getMsgBlobMtime()
 363+ * yourself and take its result into consideration.
 364+ *
361365 * @param $context ResourceLoaderContext: Context object
362366 * @return Integer: UNIX timestamp
363367 */
Index: trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php
@@ -157,6 +157,7 @@
158158 if ( count( $mtimes ) ) {
159159 $modifiedTime = max( $modifiedTime, max( $mtimes ) );
160160 }
 161+ $modifiedTime = max( $modifiedTime, $this->getMsgBlobMtime( $context->getLanguage() ) );
161162 return $modifiedTime;
162163 }
163164

Follow-up revisions

RevisionCommit summaryAuthorDate
r1132781.19wmf1: MFT r113277catrope19:36, 7 March 2012
r113292Follow-up r113277: release-noteskrinkle20:45, 7 March 2012
r114015MFT r112918, r113214, r113268, r113277, r113312, r113415, r113454, r113737, r...reedy15:18, 16 March 2012

Comments

#Comment by Catrope (talk | contribs)   19:38, 7 March 2012

I checked, and there are no extensions that directly extend ResourceLoaderModule

Status & tagging log