From: Tim Starling Date: Fri, 2 Mar 2012 04:00:58 +0000 (+0000) Subject: Fix for r86304: if MessageCache::parse() is called twice, once with $interface=true... X-Git-Tag: 1.31.0-rc.0~24429 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=d85a86baa1d396d4d3ac663b64f4d2f9b6fa96fc;p=lhc%2Fweb%2Fwiklou.git 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. --- 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 ) {