r90515 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90514‎ | r90515 | r90516 >
Date:09:45, 21 June 2011
Author:robin
Status:ok
Tags:
Comment:
Per comment by Platonides on r90337: use wfGetLangObj() instead of Language::factory() and this->mPageLanguage is not needed
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -67,7 +67,6 @@
6868 var $mRedirect = null; // /< Is the article at this title a redirect?
6969 var $mNotificationTimestamp = array(); // /< Associative array of user ID -> timestamp/false
7070 var $mBacklinkCache = null; // /< Cache of links to this title
71 - var $mPageLanguage;
7271 // @}
7372
7473
@@ -4231,16 +4230,16 @@
42324231 */
42334232 public function getPageLanguage() {
42344233 global $wgContLang;
4235 - $this->mPageLanguage = $wgContLang;
 4234+ $pageLang = $wgContLang;
42364235 if ( $this->isCssOrJsPage() ) {
42374236 // css/js should always be LTR and is, in fact, English
4238 - $this->mPageLanguage = Language::factory( 'en' );
 4237+ $pageLang = wfGetLangObj( 'en' );
42394238 } elseif ( $this->getNamespace() == NS_MEDIAWIKI ) {
42404239 // Parse mediawiki messages with correct target language
42414240 list( /* $unused */, $lang ) = MessageCache::singleton()->figureMessage( $this->getText() );
4242 - $this->mPageLanguage = wfGetLangObj( $lang );
 4241+ $pageLang = wfGetLangObj( $lang );
42434242 }
4244 - return $this->mPageLanguage;
 4243+ return $pageLang;
42454244 }
42464245 }
42474246

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90337Address comment by Platonides on r90320:...robin14:49, 18 June 2011

Status & tagging log