jenkins-bot has submitted this change and it was merged.
Change subject: Prevent blank topic titles
......................................................................
Prevent blank topic titles
Change-Id: I59d759fba0066156fedc229cced910b5e17fe13c
---
M includes/Block/TopicList.php
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Bsitu: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php
index a85c313..0d54b80 100644
--- a/includes/Block/TopicList.php
+++ b/includes/Block/TopicList.php
@@ -47,7 +47,7 @@
$this->addError( 'topic', wfMessage(
'flow-error-missing-title' ) );
} else {
$this->submitted['topic'] = trim(
$this->submitted['topic'] );
- if ( strlen( $this->submitted['topic'] === 0 ) ) {
+ if ( strlen( $this->submitted['topic'] ) === 0 ) {
$this->addError( 'topic', wfMessage(
'flow-error-missing-title' ) );
} elseif ( strlen( $this->submitted['topic'] ) >
PostRevision::MAX_TOPIC_LENGTH ) {
$this->addError( 'topic', wfMessage(
'flow-error-title-too-long', PostRevision::MAX_TOPIC_LENGTH ) );
@@ -84,7 +84,7 @@
// if $wgFlowContentFormat is set to html the
PostRevision::create
// call will convert the wikitext input into html via
parsoid, and
// parsoid requires the page exist.
- Container::get( 'occupation_controller'
)->ensureFlowRevision( new \Article( $title, 0 ) );
+ Container::get( 'occupation_controller'
)->ensureFlowRevision( new \Article( $title, 0 ) );
}
$topicPost = PostRevision::create( $topicWorkflow,
$this->submitted['topic'] );
$firstPost = null;
--
To view, visit https://gerrit.wikimedia.org/r/103590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I59d759fba0066156fedc229cced910b5e17fe13c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits