jenkins-bot has submitted this change and it was merged.

Change subject: Allow zero-length descriptions in both S:EF and standard edits
......................................................................


Allow zero-length descriptions in both S:EF and standard edits

This removes the check for zero length when inserting
to External Store, and a similar check in Special:EnableFlow.

Related i18n changes

Bug: T108348
Change-Id: Ie409962f27e2cd5b8d1f8fde579c7536195a8020
---
M i18n/en.json
M i18n/qqq.json
M includes/Data/Storage/RevisionStorage.php
M includes/Specials/SpecialEnableFlow.php
4 files changed, 5 insertions(+), 11 deletions(-)

Approvals:
  Legoktm: Looks good to me, but someone else must approve
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index 82bb641..bc87b6d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -133,7 +133,7 @@
        "flow-error-lock-moderated-post": "You cannot mark a moderated post as 
resolved.",
        "flow-error-external-multi": "Errors were encountered.<br />$1",
        "flow-error-missing-content": "Post has no content. Content is required 
to save a post.",
-       "flow-error-missing-summary": "Summary has no content. Content is 
required to save a summary.",
+       "flow-error-missing-summary": "You must submit a summary.",
        "flow-error-missing-title": "Topic has no title. Title is required to 
save a topic.",
        "flow-error-parsoid-failure": "Unable to parse content due to a Parsoid 
failure.",
        "flow-error-missing-replyto": "No \"replyTo\" parameter was supplied. 
This parameter is required for the \"reply\" action.",
@@ -160,7 +160,7 @@
        "flow-error-title-too-long": "Topic titles are restricted to $1 
{{PLURAL:$1|byte|bytes}}.",
        "flow-error-no-existing-workflow": "This workflow does not yet exist.",
        "flow-error-not-a-post": "Topic title cannot be saved as a post.",
-       "flow-error-missing-header-content": "Description has no content. Some 
content is required to save a description.",
+       "flow-error-missing-header-content": "You must submit a description.",
        "flow-error-missing-prev-revision-identifier": "Previous revision 
identifier is missing.",
        "flow-error-prev-revision-mismatch": "Another user just edited this 
post a few seconds ago. Are {{GENDER:$3|you}} sure you want to overwrite the 
recent change?",
        "flow-error-prev-revision-does-not-exist": "Could not find the previous 
revision.",
@@ -395,7 +395,6 @@
        "flow-special-enableflow-board-already-exists": "There is already a 
Flow board at [[$1]].",
        "flow-special-enableflow-invalid-title": "An invalid page title was 
provided",
        "flow-special-enableflow-board-creation-not-allowed": "You are not 
allowed to create a Flow board at [[:$1]].",
-       "flow-special-enableflow-non-existent-requires-description": "To create 
a Flow board where no page currently exists, you must provide a description.",
        "flow-special-enableflow-page-is-liquidthreads": "There is a 
LiquidThreads page at [[:$1]].",
        "flow-special-enableflow-confirmation": "You have successfully created 
a Flow board at [[$1]].",
        "flow-conversion-archive-page-name-format": "%s/Archive 
%d\n%s/Archive%d\n%s/archive %d\n%s/archive%d",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 802a00c..6bcd486 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -140,7 +140,7 @@
        "flow-error-lock-moderated-post": "Used as error message when user 
attempts to resolve (lock) a moderated topic/post.",
        "flow-error-external-multi": "Used as error message. Parameters:\n* $1 
- list of error messages\nSee also:\n* {{msg-mw|Flow-error-external}}",
        "flow-error-missing-content": "Used as error 
message.\n{{Related|Flow-error-missing}}",
-       "flow-error-missing-summary": "Used as error 
message.\n{{Related|Flow-error-missing}}",
+       "flow-error-missing-summary": "Used as error message when a summary is 
expected, but is not submitted.  Zero-length summaries are 
allowed.\n{{Related|Flow-error-missing}}",
        "flow-error-missing-title": "Used as error 
message.\n{{Related|Flow-error-missing}}",
        "flow-error-parsoid-failure": "Used as error message.\n\nParsoid is a 
bidirectional wikitext parser and runtime. Converts back and forth between 
wikitext and HTML/XML DOM with RDFa. See [[mw:Parsoid]].",
        "flow-error-missing-replyto": "Used as error message.\n\nThe variable 
name \"replyTo\" is invisible to users, so \"replyTo\" can be translated.",
@@ -167,7 +167,7 @@
        "flow-error-title-too-long": "Used as error message when a user submits 
a topic title that is too long to save.\n\nParameters:\n* $1 - The number of 
bytes allowed",
        "flow-error-no-existing-workflow": "Error message when an edit to a 
non-existing topic is performed.",
        "flow-error-not-a-post": "Error message when a topic title is attempted 
to be saved as post (most likely a code issue - shouldn't happen).",
-       "flow-error-missing-header-content": "Error message when the 
description is submitted without content.\n{{Related|Flow-error-missing}}",
+       "flow-error-missing-header-content": "Error message when a description 
is expected, but is not submitted.  Zero length descriptions are 
allowed.\n{{Related|Flow-error-missing}}",
        "flow-error-missing-prev-revision-identifier": "Error message when the 
identifier for the previous description revision is missing.",
        "flow-error-prev-revision-mismatch": "Error message when the provided 
previous revision identifier does not match the last stored revision.",
        "flow-error-prev-revision-does-not-exist": "Error message when the 
provided previous revision identifier could not be found.",
@@ -402,7 +402,6 @@
        "flow-special-enableflow-board-already-exists": "Error given on 
Special:EnableFlow if board already exists at requested page name.  
Parameters:\n$1 - Page name where user requested to put Flow board",
        "flow-special-enableflow-invalid-title": "Error given on 
Special:EnableFlow if the provided page is not a valid page name.",
        "flow-special-enableflow-board-creation-not-allowed": "Error given on 
Special:EnableFlow if the current user is not allowed to create a Flow board.  
Parameters:\n$1 - Page name where user requested to put Flow board",
-       "flow-special-enableflow-non-existent-requires-description": "Error 
given on Special:EnableFlow when page does not exist and no description is 
provided.",
        "flow-special-enableflow-page-is-liquidthreads": "Error given on 
Special:EnableFlow if the page to enable Flow on is a LiquidThreads page.  
Parameters:\n$1 - Page name where user requested to put Flow board",
        "flow-special-enableflow-confirmation": "Confirmation message on 
Special:EnableFlow saying that you have successfully created a board  
Parameters:\n$1 - Page name of new Flow board",
        "flow-conversion-archive-page-name-format": "Archive format used when 
enabling Flow on existing pages. This is a format string. %s and %d should be 
present. %s represents the title of the page where Flow is being enabled. %d 
represents a number that will be incremented if an archive page with the same 
name already exist. Multiple formats can be specified separated by the new line 
character (\\n).",
diff --git a/includes/Data/Storage/RevisionStorage.php 
b/includes/Data/Storage/RevisionStorage.php
index a79b10a..609ceee 100644
--- a/includes/Data/Storage/RevisionStorage.php
+++ b/includes/Data/Storage/RevisionStorage.php
@@ -444,7 +444,7 @@
        }
 
        protected function insertExternalStore( array $row ) {
-               if ( $row['rev_content'] === null || strlen( 
$row['rev_content'] ) === 0 ) {
+               if ( $row['rev_content'] === null ) {
                        throw new DataModelException( "Must have data to write 
to external storage", 'process-data' );
                }
                $url = ExternalStore::insertWithFallback( $this->externalStore, 
$row['rev_content'] );
diff --git a/includes/Specials/SpecialEnableFlow.php 
b/includes/Specials/SpecialEnableFlow.php
index 2cbdcd0..364d907 100644
--- a/includes/Specials/SpecialEnableFlow.php
+++ b/includes/Specials/SpecialEnableFlow.php
@@ -109,10 +109,6 @@
                        }
 
                } else {
-                       if ( !isset( $data['header'] ) || $data['header'] === 
'' ) {
-                               return Status::newFatal( 
'flow-special-enableflow-non-existent-requires-description' );
-                       }
-
                        $allowCreationStatus = 
$this->occupationController->allowCreation( $title, $this->getUser(), false );
                        if ( !$allowCreationStatus->isGood() ) {
                                return Status::newFatal( 
'flow-special-enableflow-board-creation-not-allowed', $page );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie409962f27e2cd5b8d1f8fde579c7536195a8020
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: EBernhardson <ebernhard...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Mattflaschen <mflasc...@wikimedia.org>
Gerrit-Reviewer: Matthias Mullie <mmul...@wikimedia.org>
Gerrit-Reviewer: Sbisson <sbis...@wikimedia.org>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to