From 30d8c9a42d23e01d82f791a7837e3f4bc3f53dbd Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Thu, 21 Jul 2016 21:37:08 +0000 Subject: [PATCH] Use current content model for blank page content (not title default) This means that if you specify ?model=MODEL_ID you can create a page using the non-default content model (but only if you have the correct rights. Admin by default). Previously this only worked if you specified a preload parameter that had the content model that you wanted. Additionally, I believe that this makes more sense logically in terms of using the class state instead of the global state for the current content model. Change-Id: I938be1abcae8ac0b5fdb82d0d57bad5526aa5dee --- includes/EditPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index fa741034f4..79c8b51d38 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1286,7 +1286,7 @@ class EditPage { return $this->mPreloadContent; } - $handler = ContentHandler::getForTitle( $this->getTitle() ); + $handler = ContentHandler::getForModelID( $this->contentModel ); if ( $preload === '' ) { return $handler->makeEmptyContent(); -- 2.20.1