$parserOutput = $this->getParserOutput( $wikiPage, $this->mNewRev );
- # WikiPage::getParserOutput() should not return false, but just in case
- if( $parserOutput ) {
+ # Also try to load it as a redirect
+ $rt = $this->mNewContent->getRedirectTarget();
+
+ if ( $rt ) {
+ $article = Article::newFromTitle( $this->mNewPage, $this->getContext() );
+ $out->addHTML( $article->viewRedirect( $rt ) );
+
+ # WikiPage::getParserOutput() should not return false, but just in case
+ if ( $parserOutput ) {
+ # Show categories etc.
+ $out->addParserOutputNoText( $parserOutput );
+ }
+ } else if ( $parserOutput ) {
$out->addParserOutput( $parserOutput );
}
}