From: Brian Wolff Date: Thu, 21 Jul 2016 21:37:08 +0000 (+0000) Subject: Use current content model for blank page content (not title default) X-Git-Tag: 1.31.0-rc.0~6289^2 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=30d8c9a42d23e01d82f791a7837e3f4bc3f53dbd;p=lhc%2Fweb%2Fwiklou.git 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 --- 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();