X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FMovePage.php;h=a8f6f8e2e670f0195882e940f6836cfd48391644;hp=d17f23422dc9557cd0ad2bf12b772cbbe7fdaac3;hb=7874fc4bec845ad92960b07e969c65f3c3fe74f2;hpb=3f577abedae92a7cdb17b247df9adac8f8b4ab7e diff --git a/includes/MovePage.php b/includes/MovePage.php index d17f23422d..a8f6f8e2e6 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -131,6 +131,14 @@ class MovePage { 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 @@ -446,7 +454,7 @@ class MovePage { $status = $newpage->doDeleteArticleReal( $overwriteMessage, /* $suppress */ false, - $nt->getArticleId(), + $nt->getArticleID(), /* $commit */ false, $errs, $user @@ -531,8 +539,8 @@ class MovePage { __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 ); }