Reset $mConvRuleTitle before every language conversion run
authorLiangent <liangent@gmail.com>
Tue, 25 Sep 2012 17:45:54 +0000 (01:45 +0800)
committerLiangent <liangent@gmail.com>
Fri, 7 Dec 2012 15:48:33 +0000 (23:48 +0800)
When conversion is run more than once, and manual title conversion is
only used in some of them, the result of title conversion is incorrectly
applied to all output after where it's really used.

In the past nothing has been broken because the converter is run for at
most one page (so at most one page title) in one request but this is not
true anymore when parser tests come.

Change-Id: Id689feaeff93acb859f7ba8d2aec0d7dbb5d1b6c

languages/LanguageConverter.php

index 8b7d6cb..0db00f8 100644 (file)
@@ -597,6 +597,8 @@ class LanguageConverter {
                if ( $wgDisableLangConversion ) {
                        return $text;
                }
+               // Reset converter state for a new converter run.
+               $this->mConvRuleTitle = false;
                return $this->recursiveConvertTopLevel( $text, $variant );
        }