User "Platonides" posted a comment on MediaWiki.r100227. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100227#c24629 Commit summary:
* 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) Comment: It seems to do the stated job, but... why? _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
