# Viewing a redirect page (e.g. with parameter redirect=no)
$wgOut->addHTML( $this->viewRedirect( $rt ) );
# Parse just to get categories, displaytitle, etc.
- $this->mParserOutput = $content->getParserOutput( $this->getTitle(), $oldid, $parserOptions, false );
+ $this->mParserOutput = $content->getParserOutput( $this->getContext(), $oldid, $parserOptions, false );
$wgOut->addParserOutputNoText( $this->mParserOutput );
$outputDone = true;
}
#XXX: For CSS/JS pages, we should have called the ShowRawCssJs hook here. But it's now deprecated, so never mind
$content = $content->preSaveTransform( $this->mTitle, $wgUser, $parserOptions );
- $parserOutput = $content->getParserOutput( $this->mTitle, null, $parserOptions );
+
+ // TODO: might be a saner way to get a meaningfull context here?
+ $parserOutput = $content->getParserOutput( $this->getArticle()->getContext(), null, $parserOptions );
$previewHTML = $parserOutput->getText();
$this->mParserOutput = $parserOutput;
$edit->format = $serialization_format;
$edit->popts = $this->makeParserOptions( 'canonical' );
- $edit->output = $edit->pstContent->getParserOutput( $this->mTitle, $revid, $edit->popts );
+
+ // TODO: is there no better way to obtain a context here?
+ $context = RequestContext::getMain();
+ $context->setTitle( $this->mTitle );
+ $edit->output = $edit->pstContent->getParserOutput( $context, $revid, $edit->popts );
$edit->newContent = $content;
$edit->oldContent = $this->getContent( Revision::RAW );
}
$time = - microtime( true );
- $this->parserOutput = $content->getParserOutput( $this->page->getTitle(), $this->revid, $this->parserOptions );
+ // TODO: page might not have this method? Hard to tell what page is supposed to be here...
+ $this->parserOutput = $content->getParserOutput( $this->page->getContext(), $this->revid, $this->parserOptions );
$time += microtime( true );
# Timing hack