From: umherirrender Date: Fri, 12 Oct 2012 20:26:15 +0000 (+0200) Subject: (bug 40111) Disable minor edit for page/section creation by API X-Git-Tag: 1.31.0-rc.0~22045^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=64f4c341f951bd5b38c02de3ffcb6e4bf0ee7789;p=lhc%2Fweb%2Fwiklou.git (bug 40111) Disable minor edit for page/section creation by API Move set of one var to importFormData, because this is called from GUI and API. Maybe not the best solution, but EditPage is hard to change. Change-Id: Ice50b15e23233d19dd9d3b906d856e0adf2acba3 --- diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index 987d645b91..345978f75f 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -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 === diff --git a/includes/EditPage.php b/includes/EditPage.php index f2bab7dcf6..e41fa0dfbd 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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.