http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88134

Revision: 88134
Author:   nikerabbit
Date:     2011-05-15 07:16:25 +0000 (Sun, 15 May 2011)
Log Message:
-----------
Fixed a bug in transformation where previous language could leak into later 
transformations in UI language. Not sure what do with userlang.

Modified Paths:
--------------
    trunk/phase3/includes/cache/MessageCache.php
    trunk/phase3/includes/parser/ParserOptions.php

Modified: trunk/phase3/includes/cache/MessageCache.php
===================================================================
--- trunk/phase3/includes/cache/MessageCache.php        2011-05-15 06:32:26 UTC 
(rev 88133)
+++ trunk/phase3/includes/cache/MessageCache.php        2011-05-15 07:16:25 UTC 
(rev 88134)
@@ -761,11 +761,12 @@
                        $popts = $this->getParserOptions();
                        $popts->setInterfaceMessage( $interface );
                        $popts->setTargetLanguage( $language );
-                       $popts->setUserLang( $language );
 
+                       $userlang = $popts->setUserLang( $language );
                        $this->mInParser = true;
                        $message = $parser->transformMsg( $message, $popts, 
$title );
                        $this->mInParser = false;
+                       $popts->setUserLang( $userlang );
                }
                return $message;
        }

Modified: trunk/phase3/includes/parser/ParserOptions.php
===================================================================
--- trunk/phase3/includes/parser/ParserOptions.php      2011-05-15 06:32:26 UTC 
(rev 88133)
+++ trunk/phase3/includes/parser/ParserOptions.php      2011-05-15 07:16:25 UTC 
(rev 88134)
@@ -137,7 +137,7 @@
        function setTidy( $x )                      { return wfSetVar( 
$this->mTidy, $x); }
        function setSkin( $x )                      { $this->mSkin = $x; }
        function setInterfaceMessage( $x )          { return wfSetVar( 
$this->mInterfaceMessage, $x); }
-       function setTargetLanguage( $x )            { return wfSetVar( 
$this->mTargetLanguage, $x); }
+       function setTargetLanguage( $x )            { return wfSetVar( 
$this->mTargetLanguage, $x, true ); }
        function setMaxIncludeSize( $x )            { return wfSetVar( 
$this->mMaxIncludeSize, $x ); }
        function setMaxPPNodeCount( $x )            { return wfSetVar( 
$this->mMaxPPNodeCount, $x ); }
        function setMaxTemplateDepth( $x )          { return wfSetVar( 
$this->mMaxTemplateDepth, $x ); }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to