Merge "Move up devunt's name to Developers"
[lhc/web/wiklou.git] / includes / MovePage.php
index d17f234..8ee562a 100644 (file)
@@ -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