Remove unnecessary Parser::getConverterLanguage() indirection
authorC. Scott Ananian <cscott@cscott.net>
Fri, 8 Jun 2018 15:45:07 +0000 (11:45 -0400)
committerTim Starling <tstarling@wikimedia.org>
Tue, 12 Jun 2018 23:33:03 +0000 (23:33 +0000)
commitdbda7cdfb08f2928d91aebc68a1258b6a064a9b0
tree19fa1e543823b2dfb828ad469799471aa8a54f16
parent4261fec2fa469e5173819ad9ad2f450859bda5ad
Remove unnecessary Parser::getConverterLanguage() indirection

The getConverterLanguage() method was added in March 2012 in commit
561424c266128a8c2c213cd803d4786313fc20cc as a workaround for a regression
in mediawiki 1.19.  It was an indirection which checked the global variable
$wgBug34832TransitionalRollback to return a different converter language
for Chinese wikis.

When this temporary bugfix was reverted in January 2013 in commit
a3fbdaaa2c4eb5ddc6bfbd62ae57a7804a307f12, the temporary global variable
was removed, but not the getConverterLanguage() indirection.  Since then,
new code in the parser seems to have faithfully used getConverterLanguage()
instead of getTargetLanguage(), even though they are identical and the
need for getConverterLanguage() has long since passed.

Strike a small blow for elegant minimalism by removing the completely
unnecessary Parser::getConverterLanguage() indirection.  Well, sort
of: since this blight has been slowly growing inside Parser.php for
so long, we need to deprecate getConverterLanguage() first just in
case any external dependency has been infected.  Next release we
can finally excise the unnecessary method.

Change-Id: I567c29c9c7699020955699b76cbe8578d02e2fe6
RELEASE-NOTES-1.32
includes/parser/CoreParserFunctions.php
includes/parser/Parser.php