jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I18f376cefad44295874d7b1cd760ba6fc966be29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits