http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90515

Revision: 90515
Author:   robin
Date:     2011-06-21 09:45:06 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
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: trunk/phase3/includes/Title.php
===================================================================
--- trunk/phase3/includes/Title.php     2011-06-21 08:04:54 UTC (rev 90514)
+++ trunk/phase3/includes/Title.php     2011-06-21 09:45:06 UTC (rev 90515)
@@ -67,7 +67,6 @@
        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 @@
         */
        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;
        }
 }
 


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to