From 7c81ffa5a1ac994c83c812aa194223396a022155 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 27 May 2011 22:09:22 +0000 Subject: [PATCH] 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. --- includes/MessageBlobStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.20.1