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

Revision: 100232
Author:   ialex
Date:     2011-10-19 15:30:02 +0000 (Wed, 19 Oct 2011)
Log Message:
-----------
Follow-up r100227:
* Missed one call to ParserOptions::getUserLang() in Parser
* Also convert RefreshLinksJob and RefreshLinksJob2 to use 
ParserOptions::newFromUserAndLang() and pass $wgContLang instead of whatever 
$wgLang could be

Modified Paths:
--------------
    trunk/phase3/includes/job/RefreshLinksJob.php
    trunk/phase3/includes/parser/Parser.php

Modified: trunk/phase3/includes/job/RefreshLinksJob.php
===================================================================
--- trunk/phase3/includes/job/RefreshLinksJob.php       2011-10-19 15:25:12 UTC 
(rev 100231)
+++ trunk/phase3/includes/job/RefreshLinksJob.php       2011-10-19 15:30:02 UTC 
(rev 100232)
@@ -22,7 +22,7 @@
         * @return boolean success
         */
        function run() {
-               global $wgParser;
+               global $wgParser, $wgContLang;
                wfProfileIn( __METHOD__ );
 
                $linkCache = LinkCache::singleton();
@@ -42,7 +42,7 @@
                }
 
                wfProfileIn( __METHOD__.'-parse' );
-               $options = new ParserOptions;
+               $options = ParserOptions::newFromUserAndLang( new User, 
$wgContLang );
                $parserOutput = $wgParser->parse( $revision->getText(), 
$this->title, $options, true, true, $revision->getId() );
                wfProfileOut( __METHOD__.'-parse' );
                wfProfileIn( __METHOD__.'-update' );
@@ -71,7 +71,7 @@
         * @return boolean success
         */
        function run() {
-               global $wgParser;
+               global $wgParser, $wgContLang;
 
                wfProfileIn( __METHOD__ );
 
@@ -105,6 +105,7 @@
                        wfProfileOut( __METHOD__ );
                        return true;
                }
+               $options = ParserOptions::newFromUserAndLang( new User, 
$wgContLang );
                # Re-parse each page that transcludes this page and update 
their tracking links...
                foreach ( $titles as $title ) {
                        $revision = Revision::newFromTitle( $title );
@@ -114,7 +115,6 @@
                                return false;
                        }
                        wfProfileIn( __METHOD__.'-parse' );
-                       $options = new ParserOptions;
                        $parserOutput = $wgParser->parse( $revision->getText(), 
$title, $options, true, true, $revision->getId() );
                        wfProfileOut( __METHOD__.'-parse' );
                        wfProfileIn( __METHOD__.'-update' );

Modified: trunk/phase3/includes/parser/Parser.php
===================================================================
--- trunk/phase3/includes/parser/Parser.php     2011-10-19 15:25:12 UTC (rev 
100231)
+++ trunk/phase3/includes/parser/Parser.php     2011-10-19 15:30:02 UTC (rev 
100232)
@@ -4183,7 +4183,7 @@
                        if ( $prevtoclevel > 0 && $prevtoclevel < 
$wgMaxTocLevel ) {
                                $toc .= Linker::tocUnindent( $prevtoclevel - 1 
);
                        }
-                       $toc = Linker::tocList( $toc, 
$this->mOptions->getUserLang() );
+                       $toc = Linker::tocList( $toc, 
$this->mOptions->getUserLangObj() );
                        $this->mOutput->setTOCHTML( $toc );
                }
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to