Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/313531
Change subject: MovePage: Check ContentHandler::canBeUsedOn() ...................................................................... MovePage: Check ContentHandler::canBeUsedOn() If the old content model cannot be used on the new page title, the page move should be disallowed. Change-Id: I6078a4cde5a76a050dddedf59634d800765cbabf --- M includes/MovePage.php 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/313531/1 diff --git a/includes/MovePage.php b/includes/MovePage.php index 5f1dd3f..8ee562a 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -131,6 +131,14 @@ 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 -- To view, visit https://gerrit.wikimedia.org/r/313531 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6078a4cde5a76a050dddedf59634d800765cbabf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits