* @return boolean success
*/
function run() {
- global $wgParser;
+ global $wgParser, $wgContLang;
wfProfileIn( __METHOD__ );
$linkCache = LinkCache::singleton();
}
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' );
* @return boolean success
*/
function run() {
- global $wgParser;
+ global $wgParser, $wgContLang;
wfProfileIn( __METHOD__ );
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 );
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' );
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 );
}