From: Brad Jorsch Date: Tue, 20 Jan 2015 21:15:36 +0000 (-0800) Subject: API: Fix setting of wpIgnoreBlankSummary in action=edit X-Git-Tag: 1.31.0-rc.0~12645 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=24f04d9f77b6a74f753f000a8bdd6b0e8d04c84a;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index f663cc6559..8ad2ad9383 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -252,7 +252,7 @@ class ApiEditPage extends ApiBase { 'format' => $contentFormat, 'model' => $contentHandler->getModelID(), 'wpEditToken' => $params['token'], - 'wpIgnoreBlankSummary' => '', + 'wpIgnoreBlankSummary' => true, 'wpIgnoreBlankArticle' => true, 'wpIgnoreSelfRedirect' => true, ); @@ -462,7 +462,6 @@ class ApiEditPage extends ApiBase { 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 @@ class ApiEditPage extends ApiBase { break; case EditPage::AS_SUMMARY_NEEDED: + // Shouldn't happen since we set wpIgnoreBlankSummary, but just in case $this->dieUsageMsg( 'summaryrequired' ); case EditPage::AS_END: