From 5999d65b608e64b060cbe2f08ed802806c52ff5b Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 10 Feb 2008 14:29:17 +0000 Subject: [PATCH] Fixed total breakage of the local message cache since r30437 --- includes/MessageCache.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/MessageCache.php b/includes/MessageCache.php index 976cd968f6..755d379e3e 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -74,15 +74,6 @@ class MessageCache { } if ( $wgLocalMessageCacheSerialized ) { - $localHash=substr(fread($file,40),8); - fclose($file); - if ($hash!=$localHash) { - return; - } - - require("$wgLocalMessageCache/messages-" . wfWikiID()); - $this->setCache( $this->mCache); - } else { // Check to see if the file has the hash specified $localHash = fread( $file, 32 ); if ( $hash === $localHash ) { @@ -91,6 +82,15 @@ class MessageCache { $this->setCache( unserialize( $serialized ) ); } fclose( $file ); + } else { + $localHash=substr(fread($file,40),8); + fclose($file); + if ($hash!=$localHash) { + return; + } + + require("$wgLocalMessageCache/messages-" . wfWikiID()); + $this->setCache( $this->mCache); } } -- 2.20.1