From: Roan Kattouw Date: Wed, 7 Mar 2012 19:33:37 +0000 (+0000) Subject: (bug 35036) Wikipage-based ResourceLoader modules were not automatically purged as... X-Git-Tag: 1.31.0-rc.0~24345 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=beb7ab0f36bf9e325669b40950b18dc5cce4fccb;p=lhc%2Fweb%2Fwiklou.git (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 --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 7e293deba9..d960c26fe2 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -295,6 +295,8 @@ production. calling action=purge&forcelinkupdate. * (bug 34377) action=watch now parses messages using the correct title instead of "API". +* (bug 35036) WikiLove messages were not automatically updated in JavaScript + after having been changed on-wiki due to a bug in core === Languages updated in 1.19 === diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index 6db5fb695e..1a232ec26a 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -357,6 +357,10 @@ abstract class ResourceLoaderModule { * timestamps. Whenever anything happens that changes the module's * contents for these parameters, the mtime should increase. * + * NOTE: The mtime of the module's messages is NOT automatically included. + * If you want this to happen, you'll need to call getMsgBlobMtime() + * yourself and take its result into consideration. + * * @param $context ResourceLoaderContext: Context object * @return Integer: UNIX timestamp */ diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php b/includes/resourceloader/ResourceLoaderWikiModule.php index b13753119f..91a51f896c 100644 --- a/includes/resourceloader/ResourceLoaderWikiModule.php +++ b/includes/resourceloader/ResourceLoaderWikiModule.php @@ -157,6 +157,7 @@ abstract class ResourceLoaderWikiModule extends ResourceLoaderModule { if ( count( $mtimes ) ) { $modifiedTime = max( $modifiedTime, max( $mtimes ) ); } + $modifiedTime = max( $modifiedTime, $this->getMsgBlobMtime( $context->getLanguage() ) ); return $modifiedTime; }