From: Fomafix Date: Mon, 14 Dec 2015 17:34:10 +0000 (+0000) Subject: content: Use Language::factory( 'en' ) instead of wfGetLangObj( 'en' ) X-Git-Tag: 1.31.0-rc.0~4816^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20%20%20%24self2%20.%20%20%20%22&var_mode_affiche=boucle?a=commitdiff_plain;h=9d12d0749c6b88f271b0421b6f21c4cc9d85231d;p=lhc%2Fweb%2Fwiklou.git content: Use Language::factory( 'en' ) instead of wfGetLangObj( 'en' ) 'en' is a static value so wfGetLangObj always calls Language::factory. Change-Id: I22df4f7321ffa3e62a552bd2f449bf27feb5c042 --- diff --git a/includes/content/CodeContentHandler.php b/includes/content/CodeContentHandler.php index 20893bb0e7..dfd46c8fdc 100644 --- a/includes/content/CodeContentHandler.php +++ b/includes/content/CodeContentHandler.php @@ -29,31 +29,31 @@ abstract class CodeContentHandler extends TextContentHandler { /** - * Returns the english language, because code is english, and should be handled as such. + * Returns the English language, because code is English, and should be handled as such. * * @param Title $title * @param Content $content * - * @return Language Return of wfGetLangObj( 'en' ) + * @return Language * * @see ContentHandler::getPageLanguage() */ public function getPageLanguage( Title $title, Content $content = null ) { - return wfGetLangObj( 'en' ); + return Language::factory( 'en' ); } /** - * Returns the english language, because code is english, and should be handled as such. + * Returns the English language, because code is English, and should be handled as such. * * @param Title $title * @param Content $content * - * @return Language Return of wfGetLangObj( 'en' ) + * @return Language * * @see ContentHandler::getPageViewLanguage() */ public function getPageViewLanguage( Title $title, Content $content = null ) { - return wfGetLangObj( 'en' ); + return Language::factory( 'en' ); } /**