From: Robin Pepermans Date: Tue, 21 Jun 2011 09:45:06 +0000 (+0000) Subject: Per comment by Platonides on r90337: use wfGetLangObj() instead of Language::factory... X-Git-Tag: 1.31.0-rc.0~29381 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22messagerie%22%29%20.%20%22?a=commitdiff_plain;h=b05ae5eacf5c8c4ad87d7ee8ca7ec786d9ee4861;p=lhc%2Fweb%2Fwiklou.git Per comment by Platonides on r90337: use wfGetLangObj() instead of Language::factory() and this->mPageLanguage is not needed --- diff --git a/includes/Title.php b/includes/Title.php index ebbf1e1128..b55a6d8954 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -67,7 +67,6 @@ class Title { var $mRedirect = null; // /< Is the article at this title a redirect? var $mNotificationTimestamp = array(); // /< Associative array of user ID -> timestamp/false var $mBacklinkCache = null; // /< Cache of links to this title - var $mPageLanguage; // @} @@ -4231,16 +4230,16 @@ class Title { */ public function getPageLanguage() { global $wgContLang; - $this->mPageLanguage = $wgContLang; + $pageLang = $wgContLang; if ( $this->isCssOrJsPage() ) { // css/js should always be LTR and is, in fact, English - $this->mPageLanguage = Language::factory( 'en' ); + $pageLang = wfGetLangObj( 'en' ); } elseif ( $this->getNamespace() == NS_MEDIAWIKI ) { // Parse mediawiki messages with correct target language list( /* $unused */, $lang ) = MessageCache::singleton()->figureMessage( $this->getText() ); - $this->mPageLanguage = wfGetLangObj( $lang ); + $pageLang = wfGetLangObj( $lang ); } - return $this->mPageLanguage; + return $pageLang; } }