Anomie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/186086

Change subject: API: Fix setting of wpIgnoreBlankSummary in action=edit
......................................................................

API: Fix setting of wpIgnoreBlankSummary in action=edit

EditPage checks this using getBool(), not getCheck(), so empty string is
interpreted as false.

Also clean up a long-obsolete comment.

Bug: T87188
Change-Id: I18f376cefad44295874d7b1cd760ba6fc966be29
---
M includes/api/ApiEditPage.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/86/186086/1

diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index f663cc6..8ad2ad9 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -252,7 +252,7 @@
                        'format' => $contentFormat,
                        'model' => $contentHandler->getModelID(),
                        'wpEditToken' => $params['token'],
-                       'wpIgnoreBlankSummary' => '',
+                       'wpIgnoreBlankSummary' => true,
                        'wpIgnoreBlankArticle' => true,
                        'wpIgnoreSelfRedirect' => true,
                );
@@ -462,7 +462,6 @@
                        case EditPage::AS_CONFLICT_DETECTED:
                                $this->dieUsageMsg( 'editconflict' );
 
-                       // case EditPage::AS_SUMMARY_NEEDED: Can't happen since 
we set wpIgnoreBlankSummary
                        case EditPage::AS_TEXTBOX_EMPTY:
                                $this->dieUsageMsg( 'emptynewsection' );
 
@@ -487,6 +486,7 @@
                                break;
 
                        case EditPage::AS_SUMMARY_NEEDED:
+                               // Shouldn't happen since we set 
wpIgnoreBlankSummary, but just in case
                                $this->dieUsageMsg( 'summaryrequired' );
 
                        case EditPage::AS_END:

-- 
To view, visit https://gerrit.wikimedia.org/r/186086
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18f376cefad44295874d7b1cd760ba6fc966be29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to