* Changed ParserOptions to store a Language object instead of only a string, avoids...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 19 Oct 2011 14:16:01 +0000 (14:16 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 19 Oct 2011 14:16:01 +0000 (14:16 +0000)
commitbd548f36e959edfc89cf04d6136dd058a849b7b2
treea7626a671307a6ab999b6e0efcb93e56f31bab9c
parentc367be74e757a2af74571e48649fafdaa7123c30
* Changed ParserOptions to store a Language object instead of only a string, avoids object -> string -> object conversion
* ParserOptions::getUserLang() will still return a string for compatibility, added ParserOptions::getUserLangObj() to get the object
* Added ParserOptions::newFromUserAndLang() and ParserOptions::newFromContext() to easily get a ParserOptions object when a context is available or when someone wants to force the language
* Updated OutputPage and Preferences to use newFromContext() and WikiPage to use newFromUserAndLang()
* ParserOptions::setUserLang() still accepts either a string or a Language object, but changed the calls to pass an object instead of a string
* Changed Parser::getFunctionLang() to return the Language object from ParserOptions when parsing interface messages rather than $wgLang directly and updated the documentation to say that $wgLang should not be used directly (as $wgUser, $wgTitle and $wgRequest)
includes/OutputPage.php
includes/Preferences.php
includes/WikiPage.php
includes/installer/Installer.php
includes/parser/CoreParserFunctions.php
includes/parser/Parser.php
includes/parser/ParserOptions.php