ContentHandler::getLocalizedName( $this->oldTitle->getContentModel() ),
ContentHandler::getLocalizedName( $this->newTitle->getContentModel() )
);
+ } elseif (
+ !ContentHandler::getForTitle( $this->oldTitle )->canBeUsedOn( $this->newTitle )
+ ) {
+ $status->fatal(
+ 'content-not-allowed-here',
+ ContentHandler::getLocalizedName( $this->oldTitle->getContentModel() ),
+ $this->newTitle->getPrefixedText()
+ );
}
// Image-specific checks
$status = $newpage->doDeleteArticleReal(
$overwriteMessage,
/* $suppress */ false,
- $nt->getArticleId(),
+ $nt->getArticleID(),
/* $commit */ false,
$errs,
$user
__METHOD__
);
- // clean up the old title before reset article id - bug 45348
if ( !$redirectContent ) {
+ // Clean up the old title *before* reset article id - bug 45348
WikiPage::onArticleDelete( $this->oldTitle );
}