From: Roan Kattouw Date: Fri, 27 May 2011 22:09:22 +0000 (+0000) Subject: Fix issue on the live site causing RL requests for ext.uploadWizard to consistently... X-Git-Tag: 1.31.0-rc.0~29906 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=7c81ffa5a1ac994c83c812aa194223396a022155;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/includes/MessageBlobStore.php b/includes/MessageBlobStore.php index 5e6c8e5e13..720073e2db 100644 --- a/includes/MessageBlobStore.php +++ b/includes/MessageBlobStore.php @@ -340,7 +340,7 @@ class MessageBlobStore { } // 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 {