Merge "(bug 40111) Disable minor edit for page/section creation by API"
authorMaxSem <maxsem.wiki@gmail.com>
Fri, 12 Oct 2012 22:25:25 +0000 (22:25 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 12 Oct 2012 22:25:25 +0000 (22:25 +0000)
RELEASE-NOTES-1.21
includes/EditPage.php

index 987d645..345978f 100644 (file)
@@ -36,6 +36,7 @@ production.
 * action=edit and action=parse now support contentmodel and contentformat parameters to control the interpretation of
   page content; See docs/contenthandler.txt for details.
 * (bug 35693) ApiQueryImageInfo now suppresses errors when unserializing metadata.
+* (bug 40111) Disable minor edit for page/section creation by API
 
 === Languages updated in 1.21 ===
 
index f2bab7d..e41fa0d 100644 (file)
@@ -381,7 +381,6 @@ class EditPage {
                $this->isCssSubpage         = $this->mTitle->isCssSubpage();
                $this->isJsSubpage          = $this->mTitle->isJsSubpage();
                $this->isWrongCaseCssJsPage = $this->isWrongCaseCssJsPage();
-               $this->isNew                = !$this->mTitle->exists() || $this->section == 'new';
 
                # Show applicable editing introductions
                if ( $this->formtype == 'initial' || $this->firsttime ) {
@@ -594,6 +593,7 @@ class EditPage {
 
                # Section edit can come from either the form or a link
                $this->section = $request->getVal( 'wpSection', $request->getVal( 'section' ) );
+               $this->isNew = !$this->mTitle->exists() || $this->section == 'new';
 
                if ( $request->wasPosted() ) {
                        # These fields need to be checked for encoding.