From d85a86baa1d396d4d3ac663b64f4d2f9b6fa96fc Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 2 Mar 2012 04:00:58 +0000 Subject: [PATCH] Fix for r86304: if MessageCache::parse() is called twice, once with $interface=true and then with $interface=false, actually use $interface=false the second time instead of using the cached value from the previous call. Same for $language. This is the reason why edittools was affected by bug 34832. --- includes/cache/MessageCache.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 8ee8fba928..a1d76dc45b 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -834,13 +834,8 @@ class MessageCache { $parser = $this->getParser(); $popts = $this->getParserOptions(); - - if ( $interface ) { - $popts->setInterfaceMessage( true ); - } - if ( $language !== null ) { - $popts->setTargetLanguage( $language ); - } + $popts->setInterfaceMessage( $interface ); + $popts->setTargetLanguage( $language ); wfProfileIn( __METHOD__ ); if ( !$title || !$title instanceof Title ) { -- 2.20.1