Proposed cleanup of recent LanguageConverter-related commits:
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 10 Apr 2010 13:38:50 +0000 (13:38 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 10 Apr 2010 13:38:50 +0000 (13:38 +0000)
commit3a2345fe1c246bc0605f06baaa50992adf7c9eb8
tree288c7899eb13fe4c5b0b997e459f2f9d6ef4578e
parent659a0b29128eb7caeaf13f2616a1c11d8ab8831b
Proposed cleanup of recent LanguageConverter-related commits:

* Moved the responsibility for calling $wgOut->setPageTitle() from OutputPage::addParserOutputNoText() to the OutputPage/Parser caller. Previously, every call to $wgOut->addWikiText() (or any other message parsing function) was resulting in the title being reset to a converted version of $wgTitle, producing bug 23124. Moving responsibility to the caller seems to work fairly well, since there are apparently only two callers that really want {{DISPLAYTITLE}} etc. to work (EditPage and Article::view).
* Reverted data flow obfuscation in OutputPage::setHTMLTitle() from r64851, replaced by the above. The caller decides what overrides what.
* Reverted inappropriate, cache-polluting references to $wgUser and $wgRequest in Parser::parse(), introduced in r64819.
* Reverted incomprehensible boolean parameter to Language::convert() from r64851, reintroduced Language::convertTitle() instead. Gave it a simpler implementation than before.
* Fixed broken {{DISPLAYTITLE}} feature, was being unconditionally overwritten by the ParserOutput::setTitleText() call in Parser::parse(). Give {{DISPLAYTITLE}} precedence over autoconverted title, like we do for -{T|...}-.
* Tested extensively (perhaps not exhaustively)
includes/Article.php
includes/OutputPage.php
includes/parser/Parser.php
languages/Language.php
languages/LanguageConverter.php