http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89001

Revision: 89001
Author:   catrope
Date:     2011-05-27 22:09:22 +0000 (Fri, 27 May 2011)
Log Message:
-----------
Fix issue on the live site causing RL requests for ext.uploadWizard to 
consistently take more than 5 seconds: the cache freshness check was failing 
all the time because ext.uploadWizard listed some messages twice, and 
duplicates were filtered on the left-hand side of the !== comparison 
(implicitly, because they're array keys), but not on the right-hand side.

Modified Paths:
--------------
    trunk/phase3/includes/MessageBlobStore.php

Modified: trunk/phase3/includes/MessageBlobStore.php
===================================================================
--- trunk/phase3/includes/MessageBlobStore.php  2011-05-27 21:43:07 UTC (rev 
89000)
+++ trunk/phase3/includes/MessageBlobStore.php  2011-05-27 22:09:22 UTC (rev 
89001)
@@ -340,7 +340,7 @@
                        }
                        // Update the module's blobs if the set of messages 
changed or if the blob is
                        // older than $wgCacheEpoch
-                       if ( array_keys( FormatJson::decode( $row->mr_blob, 
true ) ) !== $module->getMessages() ||
+                       if ( array_keys( FormatJson::decode( $row->mr_blob, 
true ) ) !== array_values( array_unique( $module->getMessages() ) ) ||
                                        wfTimestamp( TS_MW, $row->mr_timestamp 
) <= $wgCacheEpoch ) {
                                $retval[$row->mr_resource] = 
self::updateModule( $row->mr_resource, $module, $lang );
                        } else {


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to