if ( !$titleObj ) {
$this->dieUsageMsg( array( 'invalidtitle', $title ) );
}
+ if ( $titleObj->isSpecialPage() ) {
+ $this->dieUsage( 'Special pages cannot be parsed through action=parse', 'targetisspecial' );
+ }
$wgTitle = $titleObj;
$pageObj = WikiPage::factory( $titleObj );
array( 'invalidtitle', 'title' ),
array( 'code' => 'parseerror', 'info' => 'Failed to parse the given text.' ),
array( 'code' => 'notwikitext', 'info' => 'The requested operation is only supported on wikitext content.' ),
+ array( 'code' => 'targetisspecial', 'info' => 'Special pages cannot be parsed through action=parse' ),
) );
}