From b05ae5eacf5c8c4ad87d7ee8ca7ec786d9ee4861 Mon Sep 17 00:00:00 2001 From: Robin Pepermans Date: Tue, 21 Jun 2011 09:45:06 +0000 Subject: [PATCH] Per comment by Platonides on r90337: use wfGetLangObj() instead of Language::factory() and this->mPageLanguage is not needed --- includes/Title.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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; } } -- 2.20.1