jenkins-bot has submitted this change and it was merged. Change subject: Adding membership-related parameters to the CollaborationListContent validator. ......................................................................
Adding membership-related parameters to the CollaborationListContent validator. The validator implementation forgot to account for the ismemberlist boolean that, if flipped on, causes the list to be rendered totally different (once it is actually implemented per T141018). The memberoptions array should also be considered valid for the time being, since it is a part of the schema, even though it is not being used for anything yet. Also made some other changes for consistency. Change-Id: Icfb213bbe897d563f7bbd8d585ea3c69f30b22c9 --- M includes/SpecialCreateCollaborationHub.php M includes/content/CollaborationListContent.php M includes/content/CollaborationListContentHandler.php 3 files changed, 10 insertions(+), 3 deletions(-) Approvals: Harej: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SpecialCreateCollaborationHub.php b/includes/SpecialCreateCollaborationHub.php index 3734fbe..8c50214 100644 --- a/includes/SpecialCreateCollaborationHub.php +++ b/includes/SpecialCreateCollaborationHub.php @@ -172,7 +172,7 @@ return $memberResult; } - $announcementsTitle = Title::newFromText( $data['title'] . '/' . $this->msg( 'collaborationkit-hub-pagetitle-announcements' )->plain() ); + $announcementsTitle = Title::newFromText( $data['title'] . '/' . $this->msg( 'collaborationkit-hub-pagetitle-announcements' )->inContentLanguage()->plain() ); if ( !$announcementsTitle ) { return Status::newFatal( 'collaborationkit-createhub-invalidtitle' ); } @@ -184,7 +184,7 @@ [ 'action' => 'edit', 'title' => $announcementsTitle->getFullText(), - 'text' => "* " . $context->msg( 'collaborationkit-hub-announcements-initial' )->plain() . " ~~~~~", + 'text' => "* " . $context->msg( 'collaborationkit-hub-announcements-initial' )->inContentLanguage()->plain() . " ~~~~~", 'summary' => $context->msg( 'collaborationkit-createhub-editsummary' )->inContentLanguage()->plain(), 'token' => $context->getUser()->getEditToken(), ], diff --git a/includes/content/CollaborationListContent.php b/includes/content/CollaborationListContent.php index d8ee664..5451567 100644 --- a/includes/content/CollaborationListContent.php +++ b/includes/content/CollaborationListContent.php @@ -265,6 +265,12 @@ if ( in_array( $value, [ 'normal', 'no-img' ] ) ) { return true; } + case 'ismemberlist': + $value = (bool)$value; + return true; + case 'memberoptions': + // Allow arbitrary input until this actually gets used for something. T141018 + return true; default: return false; } diff --git a/includes/content/CollaborationListContentHandler.php b/includes/content/CollaborationListContentHandler.php index f8aea97..d2b04a7 100644 --- a/includes/content/CollaborationListContentHandler.php +++ b/includes/content/CollaborationListContentHandler.php @@ -73,7 +73,8 @@ ], "options" => [ "ismemberlist" => true, - "memberoptions" => (object)[] + "memberoptions" => (object)[], + "mode" => "normal" ], "description" => "$initialDescription" ]; -- To view, visit https://gerrit.wikimedia.org/r/309228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icfb213bbe897d563f7bbd8d585ea3c69f30b22c9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CollaborationKit Gerrit-Branch: master Gerrit-Owner: Harej <jamesmh...@gmail.com> Gerrit-Reviewer: Harej <jamesmh...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits