if ( !$page ) {
switch( $title->getNamespace() ) {
case NS_FILE:
- $page = new ImagePage( $title ); #FIXME: teach ImagePage to use ContentHandler
+ $page = new ImagePage( $title );
break;
case NS_CATEGORY:
- $page = new CategoryPage( $title ); #FIXME: teach ImagePage to use ContentHandler
+ $page = new CategoryPage( $title );
break;
default:
- $handler = ContentHandler::getForTitle( $title );
- $page = $handler->createArticle( $title );
+ $page = new Article( $title );
}
}
$page->setContext( $context );
# Viewing a redirect page (e.g. with parameter redirect=no)
$outputPage->addHTML( $this->viewRedirect( $rt ) );
# Parse just to get categories, displaytitle, etc.
- $this->mParserOutput = $content->getParserOutput( $this->getContext(), $oldid, $parserOptions, false );
+ $this->mParserOutput = $content->getParserOutput( $this->getTitle(), $oldid, $parserOptions, false );
$outputPage->addParserOutputNoText( $this->mParserOutput );
$outputDone = true;
}
// Give hooks a chance to customise the output
if ( !Hooks::isRegistered('ShowRawCssJs') || wfRunHooks( 'ShowRawCssJs', array( $this->fetchContent(), $this->getTitle(), $wgOut ) ) ) { #FIXME: fetchContent() is deprecated
- $po = $this->mContentObject->getParserOutput( $this->getContext() );
+ $po = $this->mContentObject->getParserOutput( $this->getTitle() );
$wgOut->addHTML( $po->getText() );
}
}