https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113277

Revision: 113277
Author:   catrope
Date:     2012-03-07 19:33:37 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
(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
    trunk/phase3/includes/resourceloader/ResourceLoaderModule.php
    trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php

Modified: trunk/phase3/RELEASE-NOTES-1.19
===================================================================
--- trunk/phase3/RELEASE-NOTES-1.19     2012-03-07 19:33:08 UTC (rev 113276)
+++ trunk/phase3/RELEASE-NOTES-1.19     2012-03-07 19:33:37 UTC (rev 113277)
@@ -295,6 +295,8 @@
   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 ===
 

Modified: trunk/phase3/includes/resourceloader/ResourceLoaderModule.php
===================================================================
--- trunk/phase3/includes/resourceloader/ResourceLoaderModule.php       
2012-03-07 19:33:08 UTC (rev 113276)
+++ trunk/phase3/includes/resourceloader/ResourceLoaderModule.php       
2012-03-07 19:33:37 UTC (rev 113277)
@@ -357,6 +357,10 @@
         * 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
         */

Modified: trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php
===================================================================
--- trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php   
2012-03-07 19:33:08 UTC (rev 113276)
+++ trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php   
2012-03-07 19:33:37 UTC (rev 113277)
@@ -157,6 +157,7 @@
                if ( count( $mtimes ) ) {
                        $modifiedTime = max( $modifiedTime, max( $mtimes ) );
                }
+               $modifiedTime = max( $modifiedTime, $this->getMsgBlobMtime( 
$context->getLanguage() ) );
                return $modifiedTime;
        }
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to