EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/158634
Change subject: H-4: Rename Close -> Lock ...................................................................... H-4: Rename Close -> Lock Change-Id: I07dec52b95f1439030a6661afa15d6ad733a60d2 --- M Flow.php M FlowActions.php M Hooks.php M Resources.php M handlebars/Makefile M handlebars/compiled/flow_block_topic.handlebars.php R handlebars/compiled/flow_block_topic_lock.handlebars.php M handlebars/compiled/flow_block_topiclist.handlebars.php R handlebars/compiled/flow_block_topicsummary_lock.handlebars.php D handlebars/flow_block_topic_close.handlebars A handlebars/flow_block_topic_lock.handlebars R handlebars/flow_block_topicsummary_lock.handlebars M handlebars/flow_topic_titlebar.handlebars M handlebars/flow_topic_titlebar_content.handlebars R handlebars/flow_topic_titlebar_lock.handlebars M i18n/en.json M i18n/qqq.json D includes/Actions/CloseTopicAction.php A includes/Actions/LockTopicAction.php M includes/Block/Topic.php M includes/Block/TopicSummary.php M includes/Formatter/RecentChangesQuery.php M includes/Formatter/RevisionFormatter.php M includes/Model/AbstractRevision.php M includes/UrlGenerator.php M includes/api/ApiFlow.php R includes/api/ApiFlowLockTopic.php M modules/new/components/flow-board.js M modules/new/flow-api.js M modules/new/styles/board/moderated.less A tests/browser/.bundle/config R tests/browser/features/lock_unlock_topics.feature D tests/browser/features/step_definitions/close_reopen_topics_steps.rb A tests/browser/features/step_definitions/lock_unlock_topics_steps.rb M tests/browser/features/support/pages/flow_page.rb M tests/phpunit/PermissionsTest.php 36 files changed, 296 insertions(+), 325 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/34/158634/1 diff --git a/Flow.php b/Flow.php index 53a3065..585963c 100755 --- a/Flow.php +++ b/Flow.php @@ -252,7 +252,7 @@ $wgAutoloadClasses['Flow\Actions\EditTitleAction'] = $dir . 'includes/Actions/EditTitleAction.php'; $wgAutoloadClasses['Flow\Actions\NewTopicAction'] = $dir . 'includes/Actions/NewTopicAction.php'; $wgAutoloadClasses['Flow\Actions\EditPostAction'] = $dir . 'includes/Actions/EditPostAction.php'; -$wgAutoloadClasses['Flow\Actions\CloseTopicAction'] = $dir . 'includes/Actions/CloseTopicAction.php'; +$wgAutoloadClasses['Flow\Actions\LockTopicAction'] = $dir . 'includes/Actions/LockTopicAction.php'; $wgAutoloadClasses['Flow\Actions\RestorePostAction'] = $dir . 'includes/Actions/RestorePostAction.php'; $wgAutoloadClasses['Flow\Actions\RestoreTopicAction'] = $dir . 'includes/Actions/RestoreTopicAction.php'; $wgAutoloadClasses['Flow\Actions\EditAction'] = $dir . 'includes/Actions/EditAction.php'; @@ -280,7 +280,7 @@ $wgAutoloadClasses['ApiFlowBase'] = "$dir/includes/api/ApiFlowBase.php"; $wgAutoloadClasses['ApiFlowBasePost'] = "$dir/includes/api/ApiFlowBasePost.php"; $wgAutoloadClasses['ApiFlowBaseGet'] = "$dir/includes/api/ApiFlowBaseGet.php"; -$wgAutoloadClasses['ApiFlowCloseOpenTopic'] = "$dir/includes/api/ApiFlowCloseOpenTopic.php"; +$wgAutoloadClasses['ApiFlowLockTopic'] = "$dir/includes/api/ApiFlowLockTopic.php"; $wgAutoloadClasses['ApiFlowEditHeader'] = "$dir/includes/api/ApiFlowEditHeader.php"; $wgAutoloadClasses['ApiFlowEditPost'] = "$dir/includes/api/ApiFlowEditPost.php"; $wgAutoloadClasses['ApiFlowEditTitle'] = "$dir/includes/api/ApiFlowEditTitle.php"; @@ -357,9 +357,9 @@ // permissions config than what's assumed to test. $wgFlowGroupPermissions = array(); $wgFlowGroupPermissions['user']['flow-hide'] = true; -$wgFlowGroupPermissions['user']['flow-close'] = true; +$wgFlowGroupPermissions['user']['flow-lock'] = true; $wgFlowGroupPermissions['sysop']['flow-hide'] = true; -$wgFlowGroupPermissions['sysop']['flow-close'] = true; +$wgFlowGroupPermissions['sysop']['flow-lock'] = true; $wgFlowGroupPermissions['sysop']['flow-delete'] = true; $wgFlowGroupPermissions['sysop']['flow-edit-post'] = true; $wgFlowGroupPermissions['oversight']['flow-suppress'] = true; diff --git a/FlowActions.php b/FlowActions.php index 9063b0c..7c15c47 100644 --- a/FlowActions.php +++ b/FlowActions.php @@ -77,14 +77,14 @@ 'rc_insert' => true, 'permissions' => array( PostSummary::MODERATED_NONE => '', - PostSummary::MODERATED_CLOSED => array( 'flow-hide', 'flow-close', 'flow-delete', 'flow-suppress' ), + PostSummary::MODERATED_LOCKED => array( 'flow-hide', 'flow-lock', 'flow-delete', 'flow-suppress' ), PostSummary::MODERATED_HIDDEN => array( 'flow-hide', 'flow-delete', 'flow-suppress' ), PostSummary::MODERATED_DELETED => array( 'flow-delete', 'flow-suppress' ), PostSummary::MODERATED_SUPPRESSED => array( 'flow-suppress' ), ), 'button-method' => 'GET', 'links' => array( 'topic', 'topic-history', 'watch-topic', 'unwatch-topic' ), - 'actions' => array( 'edit-topic-summary', 'close-topic', 'restore-topic' ), + 'actions' => array( 'edit-topic-summary', 'lock-topic', 'restore-topic' ), 'history' => array( 'i18n-message' => 'flow-rev-message-create-topic-summary', 'i18n-params' => array( @@ -102,14 +102,14 @@ 'rc_insert' => true, 'permissions' => array( PostSummary::MODERATED_NONE => '', - PostSummary::MODERATED_CLOSED => array( 'flow-hide', 'flow-close', 'flow-delete', 'flow-suppress' ), + PostSummary::MODERATED_LOCKED => array( 'flow-hide', 'flow-lock', 'flow-delete', 'flow-suppress' ), PostSummary::MODERATED_HIDDEN => array( 'flow-hide', 'flow-delete', 'flow-suppress' ), PostSummary::MODERATED_DELETED => array( 'flow-delete', 'flow-suppress' ), PostSummary::MODERATED_SUPPRESSED => array( 'flow-suppress' ), ), 'button-method' => 'GET', 'links' => array( 'topic', 'topic-history', 'diff-post-summary', 'watch-topic', 'unwatch-topic' ), - 'actions' => array( 'edit-topic-summary', 'close-topic', 'restore-topic' ), + 'actions' => array( 'edit-topic-summary', 'lock-topic', 'restore-topic' ), 'history' => array( 'i18n-message' => 'flow-rev-message-edit-topic-summary', 'i18n-params' => array( @@ -131,7 +131,7 @@ ), 'button-method' => 'GET', 'links' => array( 'topic', 'topic-history', 'diff-post', 'topic-revision', 'watch-topic', 'unwatch-topic' ), - 'actions' => array( 'reply', 'thank', 'edit-title', 'lock-topic', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'close-topic', 'restore-topic' ), + 'actions' => array( 'reply', 'thank', 'edit-title', 'lock-topic', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'lock-topic', 'restore-topic' ), 'history' => array( 'i18n-message' => 'flow-rev-message-edit-title', 'i18n-params' => array( @@ -159,7 +159,7 @@ ), 'button-method' => 'POST', 'links' => array( 'topic-history', 'topic', 'post', 'topic-revision', 'watch-topic', 'unwatch-topic' ), - 'actions' => array( 'reply', 'thank', 'edit-title', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'close-topic', 'restore-topic' ), + 'actions' => array( 'reply', 'thank', 'edit-title', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'lock-topic', 'restore-topic' ), 'history' => array( 'i18n-message' => 'flow-rev-message-new-post', 'i18n-params' => array( @@ -291,7 +291,7 @@ ), 'button-method' => 'POST', 'links' => array( 'topic', 'topic-history', 'topic-revision', 'watch-topic', 'unwatch-topic' ), - 'actions' => array( 'reply', 'thank', 'edit-title', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'close-topic', 'restore-topic' ), + 'actions' => array( 'reply', 'thank', 'edit-title', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'lock-topic', 'restore-topic' ), 'history' => array( 'i18n-message' => 'flow-rev-message-deleted-topic', 'i18n-params' => array( @@ -343,7 +343,7 @@ ), 'button-method' => 'POST', 'links' => array( 'topic', 'topic-history', 'topic-revision', 'watch-topic', 'unwatch-topic' ), - 'actions' => array( 'reply', 'thank', 'edit-title', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'close-topic', 'restore-topic' ), + 'actions' => array( 'reply', 'thank', 'edit-title', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'lock-topic', 'restore-topic' ), 'history' => array( 'i18n-message' => 'flow-rev-message-suppressed-topic', 'i18n-params' => array( @@ -358,19 +358,19 @@ ), ), - 'close-topic' => array( + 'lock-topic' => array( 'performs-writes' => true, - 'log_type' => 'close', + 'log_type' => 'lock', 'rc_insert' => true, 'permissions' => array( - // Only non-moderated topic can be closed - PostRevision::MODERATED_NONE => array( 'flow-hide', 'flow-close', 'flow-delete', 'flow-suppress' ), + // Only non-moderated topic can be locked + PostRevision::MODERATED_NONE => array( 'flow-hide', 'flow-lock', 'flow-delete', 'flow-suppress' ), ), 'button-method' => 'GET', 'links' => array( 'topic', 'topic-history', 'watch-topic', 'unwatch-topic' ), 'actions' => array( 'edit-topic-summary', 'restore-topic' ), 'history' => array( - 'i18n-message' => 'flow-rev-message-closed-topic', + 'i18n-message' => 'flow-rev-message-locked-topic', 'i18n-params' => array( 'user-links', 'user-text', @@ -379,9 +379,9 @@ 'moderated-reason', 'topic-of-post', ), - 'class' => 'flow-history-closed-topic', + 'class' => 'flow-history-locked-topic', ), - 'handler-class' => 'Flow\Actions\CloseTopicAction', + 'handler-class' => 'Flow\Actions\LockTopicAction', ), 'restore-post' => array( @@ -466,14 +466,14 @@ return true; }, 'permissions' => array( - PostRevision::MODERATED_CLOSED => array( 'flow-hide', 'flow-close', 'flow-delete', 'flow-suppress' ), + PostRevision::MODERATED_LOCKED => array( 'flow-hide', 'flow-lock', 'flow-delete', 'flow-suppress' ), PostRevision::MODERATED_HIDDEN => array( 'flow-hide', 'flow-delete', 'flow-suppress' ), PostRevision::MODERATED_DELETED => array( 'flow-delete', 'flow-suppress' ), PostRevision::MODERATED_SUPPRESSED => 'flow-suppress', ), 'button-method' => 'POST', 'links' => array( 'topic', 'topic-history', 'topic-revision', 'watch-topic', 'unwatch-topic' ), - 'actions' => array( 'reply', 'thank', 'edit-title', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'close-topic', 'restore-topic' ), + 'actions' => array( 'reply', 'thank', 'edit-title', 'hide-topic', 'delete-topic', 'suppress-topic', 'edit-topic-summary', 'lock-topic', 'restore-topic' ), 'history' => array( 'i18n-message' => 'flow-rev-message-restored-topic', 'i18n-params' => array( @@ -500,7 +500,7 @@ 'permissions' => array( PostRevision::MODERATED_NONE => '', PostRevision::MODERATED_HIDDEN => '', // visible for everyone (but will initially be collapsed) - PostRevision::MODERATED_CLOSED => '', + PostRevision::MODERATED_LOCKED => '', PostRevision::MODERATED_DELETED => array( 'flow-delete', 'flow-suppress' ), PostRevision::MODERATED_SUPPRESSED => 'flow-suppress', ), @@ -520,7 +520,7 @@ ), 'button-method' => 'GET', 'links' => array( 'topic-history', 'topic', 'post', 'post-revision', 'watch-topic', 'unwatch-topic' ), - 'actions' => array( 'reply', 'thank', 'edit-post', 'hide-post', 'delete-post', 'suppress-post', 'edit-topic-summary', 'close-topic', 'restore-topic' ), + 'actions' => array( 'reply', 'thank', 'edit-post', 'hide-post', 'delete-post', 'suppress-post', 'edit-topic-summary', 'lock-topic', 'restore-topic' ), 'history' => array( 'i18n-message' => 'flow-rev-message-reply', 'i18n-params' => array( @@ -605,7 +605,7 @@ return ''; }, PostRevision::MODERATED_HIDDEN => '', - PostRevision::MODERATED_CLOSED => '', + PostRevision::MODERATED_LOCKED => '', PostRevision::MODERATED_DELETED => '', PostRevision::MODERATED_SUPPRESSED => 'flow-suppress', ), @@ -622,7 +622,7 @@ 'permissions' => array( PostRevision::MODERATED_NONE => '', PostRevision::MODERATED_HIDDEN => '', - PostRevision::MODERATED_CLOSED => '', + PostRevision::MODERATED_LOCKED => '', PostRevision::MODERATED_DELETED => '', PostRevision::MODERATED_SUPPRESSED => '', ), @@ -630,9 +630,6 @@ // Actions not tied to a particular revision change_type // or just move these to a different file - 'close-open-topic' => array( - 'handler-class' => 'Flow\Actions\CloseTopicAction', - ), 'compare-header-revisions' => array( 'handler-class' => 'Flow\Actions\CompareHeaderRevisionsAction', ), diff --git a/Hooks.php b/Hooks.php index 78d9a18..ee64933 100644 --- a/Hooks.php +++ b/Hooks.php @@ -648,8 +648,8 @@ 'flow-terms-of-use-reply' => null, 'flow-terms-of-use-edit' => null, 'flow-terms-of-use-summarize' => null, - 'flow-terms-of-use-close-topic' => null, - 'flow-terms-of-use-reopen-topic' => null + 'flow-terms-of-use-lock-topic' => null, + 'flow-terms-of-use-unlock-topic' => null ); if ( !array_key_exists( $key, $terms ) ) { diff --git a/Resources.php b/Resources.php index faec23d..b3b43f9 100644 --- a/Resources.php +++ b/Resources.php @@ -66,7 +66,7 @@ "flow_tooltip_subscribed.handlebars", "flow_topic.handlebars", "flow_topic_titlebar.handlebars", - "flow_topic_titlebar_close.handlebars", + "flow_topic_titlebar_lock.handlebars", "flow_topic_titlebar_watch.handlebars", "flow_topic_titlebar_content.handlebars", "flow_topic_titlebar_summary.handlebars", @@ -104,21 +104,21 @@ 'flow-reply-topic-title-placeholder', 'flow-sorting-tooltip', 'flow-summarize-topic-submit', - 'flow-reopen-topic-submit', - 'flow-close-topic-submit', + 'flow-unlock-topic-submit', + 'flow-lock-topic-submit', 'flow-toggle-small-topics', 'flow-toggle-topics', 'flow-toggle-topics-posts', 'flow-topic-comments', 'flow-topic-action-hide-topic', - 'flow-topic-action-close-topic', + 'flow-topic-action-lock-topic', 'flow-topic-action-delete-topic', 'flow-topic-action-edit-title', 'flow-topic-action-hide-topic', 'flow-topic-action-history', 'flow-topic-action-resummarize-topic', 'flow-topic-action-summarize-topic', - 'flow-topic-action-reopen-topic', + 'flow-topic-action-unlock-topic', 'flow-topic-action-suppress-topic', 'flow-topic-action-view', 'flow-topic-action-hide-topic', @@ -137,8 +137,8 @@ 'talkpagelinktext', 'flow-cancel-warning', // Moderation state - 'flow-close-title-content', - 'flow-close-post-content', + 'flow-lock-title-content', + 'flow-lock-post-content', 'flow-hide-title-content', 'flow-hide-post-content', 'flow-delete-title-content', @@ -156,8 +156,8 @@ 'flow-terms-of-use-reply', 'flow-terms-of-use-edit', 'flow-terms-of-use-summarize', - 'flow-terms-of-use-close-topic', - 'flow-terms-of-use-reopen-topic', + 'flow-terms-of-use-lock-topic', + 'flow-terms-of-use-unlock-topic', 'flow-no-more-fwd', // Tooltip 'flow-topic-notification-subscribe-title', @@ -322,7 +322,7 @@ 'messages' => array( 'flow-error-external', 'flow-error-http', - 'flow-error-fetch-after-open-close', + 'flow-error-fetch-after-lock', 'mw-ui-unsubmitted-confirm', 'flow-reply-link', ) diff --git a/handlebars/Makefile b/handlebars/Makefile index d137e80..b1826ab 100644 --- a/handlebars/Makefile +++ b/handlebars/Makefile @@ -17,7 +17,7 @@ TOPIC_SUBTEMPLATES=flow_topic.handlebars \ flow_topic_titlebar.handlebars \ flow_topic_titlebar_content.handlebars \ - flow_topic_titlebar_close.handlebars \ + flow_topic_titlebar_lock.handlebars \ flow_topic_titlebar_summary.handlebars \ flow_topic_titlebar_watch.handlebars \ flow_reply_form.handlebars \ @@ -37,12 +37,12 @@ compiled/flow_block_topic_history.handlebars.php \ compiled/flow_block_topic_single_view.handlebars.php \ compiled/flow_block_topic_diff_view.handlebars.php \ - compiled/flow_block_topic_close.handlebars.php \ + compiled/flow_block_topic_lock.handlebars.php \ compiled/flow_block_topic_edit_title.handlebars.php \ compiled/flow_block_topic_moderate_topic.handlebars.php \ compiled/flow_block_topic_moderate_post.handlebars.php \ compiled/flow_block_board-history.handlebars.php \ - compiled/flow_block_topicsummary_close.handlebars.php \ + compiled/flow_block_topicsummary_lock.handlebars.php \ compiled/flow_block_topicsummary_edit.handlebars.php \ compiled/flow_block_topicsummary_single_view.handlebars.php \ compiled/flow_block_topicsummary_diff_view.handlebars.php \ @@ -70,10 +70,10 @@ flow_block_header_diff_view.handlebars $(COMPILE) flow_block_header_diff_view -compiled/flow_block_topicsummary_close.handlebars.php: \ - flow_block_topicsummary_close.handlebars \ +compiled/flow_block_topicsummary_lock.handlebars.php: \ + flow_block_topicsummary_lock.handlebars \ flow_errors.handlebars - $(COMPILE) flow_block_topicsummary_close + $(COMPILE) flow_block_topicsummary_lock compiled/flow_block_topicsummary_edit.handlebars.php: \ flow_block_topicsummary_edit.handlebars \ @@ -128,13 +128,13 @@ $(TOPIC_SUBTEMPLATES) $(COMPILE) flow_block_topic_diff_view -compiled/flow_block_topic_close.handlebars.php: \ - flow_block_topic_close.handlebars - $(COMPILE) flow_block_topic_close +compiled/flow_block_topic_lock.handlebars.php: \ + flow_block_topic_lock.handlebars + $(COMPILE) flow_block_topic_lock -compiled/flow_topic_titlebar_close.handlebars.php: \ - flow_block_topic_titlebar_close.handlebars - $(COMPILE) flow_block_topic_close +compiled/flow_topic_titlebar_lock.handlebars.php: \ + flow_block_topic_titlebar_lock.handlebars + $(COMPILE) flow_block_topic_lock compiled/flow_block_topic_edit_title.handlebars.php: \ flow_block_topic_edit_title.handlebars \ diff --git a/handlebars/compiled/flow_block_topic.handlebars.php b/handlebars/compiled/flow_block_topic.handlebars.php index 723440f..801374a 100644 --- a/handlebars/compiled/flow_block_topic.handlebars.php +++ b/handlebars/compiled/flow_block_topic.handlebars.php @@ -49,7 +49,7 @@ <h2 class="flow-topic-title" data-title="'.LCRun3::ch($cx, 'plaintextSnippet', Array(Array(((is_array($in['content']) && isset($in['content']['format'])) ? $in['content']['format'] : null),((is_array($in['content']) && isset($in['content']['content'])) ? $in['content']['content'] : null)),Array()), 'encq').'">'.LCRun3::ch($cx, 'escapeContent', Array(Array(((is_array($in['content']) && isset($in['content']['format'])) ? $in['content']['format'] : null),((is_array($in['content']) && isset($in['content']['content'])) ? $in['content']['content'] : null)),Array()), 'encq').'</h2> '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? $in['isModerated'] : null))) ? ' <div class="flow-moderated-topic-title flow-ui-text-truncated"><span - class="wikiglyph '.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'close'),Array()), $in, function($cx, $in) {return 'wikiglyph-stop';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'hide'),Array()), $in, function($cx, $in) {return 'wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'delete'),Array()), $in, function($cx, $in) {return 'wikiglyph-trash';}).'"></span> + class="wikiglyph '.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'lock'),Array()), $in, function($cx, $in) {return 'wikiglyph-stop';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'hide'),Array()), $in, function($cx, $in) {return 'wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'delete'),Array()), $in, function($cx, $in) {return 'wikiglyph-trash';}).'"></span> '.LCRun3::ch($cx, 'l10n', Array(Array('post_moderation_state',((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && isset($in['replyToId'])) ? $in['replyToId'] : null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 'encq').'</div> ' : '').' <div class="flow-topic-meta"> @@ -154,16 +154,6 @@ </a> </li> ' : '').' - '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['lock'])) ? $in['actions']['lock'] : null))) ? ' - <li> - <a class="mw-ui-button mw-ui-progressive mw-ui-quiet" - href="'.htmlentities(((is_array($in['actions']['lock']) && isset($in['actions']['lock']['url'])) ? $in['actions']['lock']['url'] : null), ENT_QUOTES, 'UTF-8').'" - title="'.htmlentities(((is_array($in['actions']['lock']) && isset($in['actions']['lock']['title'])) ? $in['actions']['lock']['title'] : null), ENT_QUOTES, 'UTF-8').'"> - <span class="wikiglyph wikiglyph-lock"></span> - '.LCRun3::ch($cx, 'l10n', Array(Array('TODO-lock'),Array()), 'encq').' - </a> - </li> - ' : '').' '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['summarize'])) ? $in['actions']['summarize'] : null))) ? ' <li> <a class="mw-ui-button mw-ui-progressive mw-ui-quiet" @@ -259,31 +249,31 @@ </a> </li> ' : '').' - '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['close'])) ? $in['actions']['close'] : null))) ? ' + '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['lock'])) ? $in['actions']['lock'] : null))) ? ' <li class="flow-menu-moderation-action"> <a class="mw-ui-button mw-ui-destructive mw-ui-quiet" data-flow-interactive-handler="apiRequest" - data-flow-api-handler="activateCloseOpenTopic" + data-flow-api-handler="activateLockTopic" data-flow-api-target="< .flow-topic-titlebar .flow-topic-summary-container" data-flow-id="'.htmlentities(((is_array($in) && isset($in['postId'])) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'" - href="'.htmlentities(((is_array($in['actions']['close']) && isset($in['actions']['close']['url'])) ? $in['actions']['close']['url'] : null), ENT_QUOTES, 'UTF-8').'" - title="'.htmlentities(((is_array($in['actions']['close']) && isset($in['actions']['close']['title'])) ? $in['actions']['close']['title'] : null), ENT_QUOTES, 'UTF-8').'"> + href="'.htmlentities(((is_array($in['actions']['lock']) && isset($in['actions']['lock']['url'])) ? $in['actions']['lock']['url'] : null), ENT_QUOTES, 'UTF-8').'" + title="'.htmlentities(((is_array($in['actions']['lock']) && isset($in['actions']['lock']['title'])) ? $in['actions']['lock']['title'] : null), ENT_QUOTES, 'UTF-8').'"> <span class="wikiglyph wikiglyph-stop"></span> - '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-close-topic'),Array()), 'encq').' + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-lock-topic'),Array()), 'encq').' </a> </li> ' : '').' - '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['reopen'])) ? $in['actions']['reopen'] : null))) ? ' + '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['unlock'])) ? $in['actions']['unlock'] : null))) ? ' <li class="flow-menu-moderation-action"> <a class="mw-ui-button mw-ui-destructive mw-ui-quiet" data-flow-interactive-handler="apiRequest" - data-flow-api-handler="activateCloseOpenTopic" + data-flow-api-handler="activateLockTopic" data-flow-id="'.htmlentities(((is_array($in) && isset($in['postId'])) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'" data-flow-api-target="< .flow-topic-titlebar .flow-topic-summary-container" - href="'.htmlentities(((is_array($in['actions']['reopen']) && isset($in['actions']['reopen']['url'])) ? $in['actions']['reopen']['url'] : null), ENT_QUOTES, 'UTF-8').'" - title="'.htmlentities(((is_array($in['actions']['reopen']) && isset($in['actions']['reopen']['title'])) ? $in['actions']['reopen']['title'] : null), ENT_QUOTES, 'UTF-8').'"> + href="'.htmlentities(((is_array($in['actions']['unlock']) && isset($in['actions']['unlock']['url'])) ? $in['actions']['unlock']['url'] : null), ENT_QUOTES, 'UTF-8').'" + title="'.htmlentities(((is_array($in['actions']['unlock']) && isset($in['actions']['unlock']['title'])) ? $in['actions']['unlock']['title'] : null), ENT_QUOTES, 'UTF-8').'"> <span class="wikiglyph wikiglyph-stop"></span> - '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-reopen-topic'),Array()), 'encq').' + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-unlock-topic'),Array()), 'encq').' </a> </li> ' : '').' diff --git a/handlebars/compiled/flow_block_topic_close.handlebars.php b/handlebars/compiled/flow_block_topic_lock.handlebars.php similarity index 90% rename from handlebars/compiled/flow_block_topic_close.handlebars.php rename to handlebars/compiled/flow_block_topic_lock.handlebars.php index e9a225a..30f480d 100644 --- a/handlebars/compiled/flow_block_topic_close.handlebars.php +++ b/handlebars/compiled/flow_block_topic_lock.handlebars.php @@ -23,7 +23,7 @@ return '<div class="flow-topic-summary-container"> <div class="flow-topic-summary"> <form class="flow-edit-form" data-flow-initial-state="collapsed" method="POST" - action="'.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? $in['isModerated'] : null))) ? ''.htmlentities(((is_array($in['actions']['reopen']) && isset($in['actions']['reopen']['url'])) ? $in['actions']['reopen']['url'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities(((is_array($in['actions']['close']) && isset($in['actions']['close']['url'])) ? $in['actions']['close']['url'] : null), ENT_QUOTES, 'UTF-8').'').'"> + action="'.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? $in['isModerated'] : null))) ? ''.htmlentities(((is_array($in['actions']['unlock']) && isset($in['actions']['unlock']['url'])) ? $in['actions']['unlock']['url'] : null), ENT_QUOTES, 'UTF-8').'' : ''.htmlentities(((is_array($in['actions']['lock']) && isset($in['actions']['lock']['url'])) ? $in['actions']['lock']['url'] : null), ENT_QUOTES, 'UTF-8').'').'"> <div class="flow-error-container"> '.((LCRun3::ifvar($cx, ((is_array($cx['scopes'][0]) && isset($cx['scopes'][0]['errors'])) ? $cx['scopes'][0]['errors'] : null))) ? ' <div class="flow-errors errorbox"> @@ -53,11 +53,11 @@ class="mw-ui-button mw-ui-constructive" data-flow-interactive-handler="apiRequest" data-flow-api-target="< .flow-topic-titlebar" - data-flow-api-handler="closeOpenTopic"> + data-flow-api-handler="lockTopic"> '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? $in['isModerated'] : null))) ? ' - '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-reopen-topic'),Array()), 'encq').' + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-unlock-topic'),Array()), 'encq').' ' : ' - '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-close-topic'),Array()), 'encq').' + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-lock-topic'),Array()), 'encq').' ').' </button> '.LCRun3::hbch($cx, 'progressiveEnhancement', Array(Array(),Array()), $in, function($cx, $in) {return ' @@ -77,9 +77,9 @@ <small class="flow-terms-of-use plainlinks"> '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? $in['isModerated'] : null))) ? ' - '.LCRun3::ch($cx, 'l10nParse', Array(Array('flow-terms-of-use-reopen-topic'),Array()), 'encq').' + '.LCRun3::ch($cx, 'l10nParse', Array(Array('flow-terms-of-use-unlock-topic'),Array()), 'encq').' ' : ' - '.LCRun3::ch($cx, 'l10nParse', Array(Array('flow-terms-of-use-close-topic'),Array()), 'encq').' + '.LCRun3::ch($cx, 'l10nParse', Array(Array('flow-terms-of-use-lock-topic'),Array()), 'encq').' ').' </small> </div> diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php b/handlebars/compiled/flow_block_topiclist.handlebars.php index b99dcd9..132a519 100644 --- a/handlebars/compiled/flow_block_topiclist.handlebars.php +++ b/handlebars/compiled/flow_block_topiclist.handlebars.php @@ -175,7 +175,7 @@ <h2 class="flow-topic-title" data-title="'.LCRun3::ch($cx, 'plaintextSnippet', Array(Array(((is_array($in['content']) && isset($in['content']['format'])) ? $in['content']['format'] : null),((is_array($in['content']) && isset($in['content']['content'])) ? $in['content']['content'] : null)),Array()), 'encq').'">'.LCRun3::ch($cx, 'escapeContent', Array(Array(((is_array($in['content']) && isset($in['content']['format'])) ? $in['content']['format'] : null),((is_array($in['content']) && isset($in['content']['content'])) ? $in['content']['content'] : null)),Array()), 'encq').'</h2> '.((LCRun3::ifvar($cx, ((is_array($in) && isset($in['isModerated'])) ? $in['isModerated'] : null))) ? ' <div class="flow-moderated-topic-title flow-ui-text-truncated"><span - class="wikiglyph '.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'close'),Array()), $in, function($cx, $in) {return 'wikiglyph-stop';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'hide'),Array()), $in, function($cx, $in) {return 'wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'delete'),Array()), $in, function($cx, $in) {return 'wikiglyph-trash';}).'"></span> + class="wikiglyph '.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'lock'),Array()), $in, function($cx, $in) {return 'wikiglyph-stop';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'hide'),Array()), $in, function($cx, $in) {return 'wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifEquals', Array(Array(((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),'delete'),Array()), $in, function($cx, $in) {return 'wikiglyph-trash';}).'"></span> '.LCRun3::ch($cx, 'l10n', Array(Array('post_moderation_state',((is_array($in) && isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in) && isset($in['replyToId'])) ? $in['replyToId'] : null),((is_array($in['moderator']) && isset($in['moderator']['name'])) ? $in['moderator']['name'] : null)),Array()), 'encq').'</div> ' : '').' <div class="flow-topic-meta"> @@ -280,16 +280,6 @@ </a> </li> ' : '').' - '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['lock'])) ? $in['actions']['lock'] : null))) ? ' - <li> - <a class="mw-ui-button mw-ui-progressive mw-ui-quiet" - href="'.htmlentities(((is_array($in['actions']['lock']) && isset($in['actions']['lock']['url'])) ? $in['actions']['lock']['url'] : null), ENT_QUOTES, 'UTF-8').'" - title="'.htmlentities(((is_array($in['actions']['lock']) && isset($in['actions']['lock']['title'])) ? $in['actions']['lock']['title'] : null), ENT_QUOTES, 'UTF-8').'"> - <span class="wikiglyph wikiglyph-lock"></span> - '.LCRun3::ch($cx, 'l10n', Array(Array('TODO-lock'),Array()), 'encq').' - </a> - </li> - ' : '').' '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['summarize'])) ? $in['actions']['summarize'] : null))) ? ' <li> <a class="mw-ui-button mw-ui-progressive mw-ui-quiet" @@ -385,31 +375,31 @@ </a> </li> ' : '').' - '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['close'])) ? $in['actions']['close'] : null))) ? ' + '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['lock'])) ? $in['actions']['lock'] : null))) ? ' <li class="flow-menu-moderation-action"> <a class="mw-ui-button mw-ui-destructive mw-ui-quiet" data-flow-interactive-handler="apiRequest" - data-flow-api-handler="activateCloseOpenTopic" + data-flow-api-handler="activateLockTopic" data-flow-api-target="< .flow-topic-titlebar .flow-topic-summary-container" data-flow-id="'.htmlentities(((is_array($in) && isset($in['postId'])) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'" - href="'.htmlentities(((is_array($in['actions']['close']) && isset($in['actions']['close']['url'])) ? $in['actions']['close']['url'] : null), ENT_QUOTES, 'UTF-8').'" - title="'.htmlentities(((is_array($in['actions']['close']) && isset($in['actions']['close']['title'])) ? $in['actions']['close']['title'] : null), ENT_QUOTES, 'UTF-8').'"> + href="'.htmlentities(((is_array($in['actions']['lock']) && isset($in['actions']['lock']['url'])) ? $in['actions']['lock']['url'] : null), ENT_QUOTES, 'UTF-8').'" + title="'.htmlentities(((is_array($in['actions']['lock']) && isset($in['actions']['lock']['title'])) ? $in['actions']['lock']['title'] : null), ENT_QUOTES, 'UTF-8').'"> <span class="wikiglyph wikiglyph-stop"></span> - '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-close-topic'),Array()), 'encq').' + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-lock-topic'),Array()), 'encq').' </a> </li> ' : '').' - '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['reopen'])) ? $in['actions']['reopen'] : null))) ? ' + '.((LCRun3::ifvar($cx, ((is_array($in['actions']) && isset($in['actions']['unlock'])) ? $in['actions']['unlock'] : null))) ? ' <li class="flow-menu-moderation-action"> <a class="mw-ui-button mw-ui-destructive mw-ui-quiet" data-flow-interactive-handler="apiRequest" - data-flow-api-handler="activateCloseOpenTopic" + data-flow-api-handler="activateLockTopic" data-flow-id="'.htmlentities(((is_array($in) && isset($in['postId'])) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'" data-flow-api-target="< .flow-topic-titlebar .flow-topic-summary-container" - href="'.htmlentities(((is_array($in['actions']['reopen']) && isset($in['actions']['reopen']['url'])) ? $in['actions']['reopen']['url'] : null), ENT_QUOTES, 'UTF-8').'" - title="'.htmlentities(((is_array($in['actions']['reopen']) && isset($in['actions']['reopen']['title'])) ? $in['actions']['reopen']['title'] : null), ENT_QUOTES, 'UTF-8').'"> + href="'.htmlentities(((is_array($in['actions']['unlock']) && isset($in['actions']['unlock']['url'])) ? $in['actions']['unlock']['url'] : null), ENT_QUOTES, 'UTF-8').'" + title="'.htmlentities(((is_array($in['actions']['unlock']) && isset($in['actions']['unlock']['title'])) ? $in['actions']['unlock']['title'] : null), ENT_QUOTES, 'UTF-8').'"> <span class="wikiglyph wikiglyph-stop"></span> - '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-reopen-topic'),Array()), 'encq').' + '.LCRun3::ch($cx, 'l10n', Array(Array('flow-topic-action-unlock-topic'),Array()), 'encq').' </a> </li> ' : '').' diff --git a/handlebars/compiled/flow_block_topicsummary_close.handlebars.php b/handlebars/compiled/flow_block_topicsummary_lock.handlebars.php similarity index 96% rename from handlebars/compiled/flow_block_topicsummary_close.handlebars.php rename to handlebars/compiled/flow_block_topicsummary_lock.handlebars.php index 354e258..e6b42b4 100644 --- a/handlebars/compiled/flow_block_topicsummary_close.handlebars.php +++ b/handlebars/compiled/flow_block_topicsummary_lock.handlebars.php @@ -22,7 +22,7 @@ so the rendering will proceed without error, we also need this to show the error of unsuccessful form submission --> -<div class="flow-close-topic-error"> +<div class="flow-lock-topic-error"> <div class="flow-error-container"> '.((LCRun3::ifvar($cx, ((is_array($cx['scopes'][0]) && isset($cx['scopes'][0]['errors'])) ? $cx['scopes'][0]['errors'] : null))) ? ' <div class="flow-errors errorbox"> diff --git a/handlebars/flow_block_topic_close.handlebars b/handlebars/flow_block_topic_close.handlebars deleted file mode 100644 index 6aa5345..0000000 --- a/handlebars/flow_block_topic_close.handlebars +++ /dev/null @@ -1,2 +0,0 @@ -{{>flow_topic_titlebar_close}} - diff --git a/handlebars/flow_block_topic_lock.handlebars b/handlebars/flow_block_topic_lock.handlebars new file mode 100644 index 0000000..7774b0f --- /dev/null +++ b/handlebars/flow_block_topic_lock.handlebars @@ -0,0 +1,2 @@ +{{>flow_topic_titlebar_lock}} + diff --git a/handlebars/flow_block_topicsummary_close.handlebars b/handlebars/flow_block_topicsummary_lock.handlebars similarity index 85% rename from handlebars/flow_block_topicsummary_close.handlebars rename to handlebars/flow_block_topicsummary_lock.handlebars index 3927798..9bbfe71 100644 --- a/handlebars/flow_block_topicsummary_close.handlebars +++ b/handlebars/flow_block_topicsummary_lock.handlebars @@ -3,6 +3,6 @@ so the rendering will proceed without error, we also need this to show the error of unsuccessful form submission --> -<div class="flow-close-topic-error"> +<div class="flow-lock-topic-error"> {{> flow_errors}} </div> diff --git a/handlebars/flow_topic_titlebar.handlebars b/handlebars/flow_topic_titlebar.handlebars index 8072d9a..dd386fa 100644 --- a/handlebars/flow_topic_titlebar.handlebars +++ b/handlebars/flow_topic_titlebar.handlebars @@ -40,16 +40,6 @@ </a> </li> {{/if}} - {{#if actions.lock}} - <li> - <a class="mw-ui-button mw-ui-progressive mw-ui-quiet" - href="{{actions.lock.url}}" - title="{{actions.lock.title}}"> - <span class="wikiglyph wikiglyph-lock"></span> - {{l10n "TODO-lock"}} - </a> - </li> - {{/if}} {{#if actions.summarize}} <li> <a class="mw-ui-button mw-ui-progressive mw-ui-quiet" @@ -145,31 +135,31 @@ </a> </li> {{/if}} - {{#if actions.close}} + {{#if actions.lock}} <li class="flow-menu-moderation-action"> <a class="mw-ui-button mw-ui-destructive mw-ui-quiet" data-flow-interactive-handler="apiRequest" - data-flow-api-handler="activateCloseOpenTopic" + data-flow-api-handler="activateLockTopic" data-flow-api-target="< .flow-topic-titlebar .flow-topic-summary-container" data-flow-id="{{postId}}" - href="{{actions.close.url}}" - title="{{actions.close.title}}"> + href="{{actions.lock.url}}" + title="{{actions.lock.title}}"> <span class="wikiglyph wikiglyph-stop"></span> - {{l10n "flow-topic-action-close-topic"}} + {{l10n "flow-topic-action-lock-topic"}} </a> </li> {{/if}} - {{#if actions.reopen}} + {{#if actions.unlock}} <li class="flow-menu-moderation-action"> <a class="mw-ui-button mw-ui-destructive mw-ui-quiet" data-flow-interactive-handler="apiRequest" - data-flow-api-handler="activateCloseOpenTopic" + data-flow-api-handler="activateLockTopic" data-flow-id="{{postId}}" data-flow-api-target="< .flow-topic-titlebar .flow-topic-summary-container" - href="{{actions.reopen.url}}" - title="{{actions.reopen.title}}"> + href="{{actions.unlock.url}}" + title="{{actions.unlock.title}}"> <span class="wikiglyph wikiglyph-stop"></span> - {{l10n "flow-topic-action-reopen-topic"}} + {{l10n "flow-topic-action-unlock-topic"}} </a> </li> {{/if}} diff --git a/handlebars/flow_topic_titlebar_content.handlebars b/handlebars/flow_topic_titlebar_content.handlebars index f058a0c..47361bd 100644 --- a/handlebars/flow_topic_titlebar_content.handlebars +++ b/handlebars/flow_topic_titlebar_content.handlebars @@ -1,7 +1,7 @@ <h2 class="flow-topic-title" data-title="{{plaintextSnippet content.format content.content}}">{{escapeContent content.format content.content}}</h2> {{#if isModerated}} <div class="flow-moderated-topic-title flow-ui-text-truncated"><span - class="wikiglyph {{#ifEquals moderateState "close"}}wikiglyph-stop{{/ifEquals}}{{#ifEquals moderateState "hide"}}wikiglyph-flag{{/ifEquals}}{{#ifEquals moderateState "delete"}}wikiglyph-trash{{/ifEquals}}"></span> + class="wikiglyph {{#ifEquals moderateState "lock"}}wikiglyph-stop{{/ifEquals}}{{#ifEquals moderateState "hide"}}wikiglyph-flag{{/ifEquals}}{{#ifEquals moderateState "delete"}}wikiglyph-trash{{/ifEquals}}"></span> {{l10n "post_moderation_state" moderateState replyToId moderator.name~}} </div> {{/if}} diff --git a/handlebars/flow_topic_titlebar_close.handlebars b/handlebars/flow_topic_titlebar_lock.handlebars similarity index 82% rename from handlebars/flow_topic_titlebar_close.handlebars rename to handlebars/flow_topic_titlebar_lock.handlebars index 64206e9..524c2ae 100644 --- a/handlebars/flow_topic_titlebar_close.handlebars +++ b/handlebars/flow_topic_titlebar_lock.handlebars @@ -3,9 +3,9 @@ <form class="flow-edit-form" data-flow-initial-state="collapsed" method="POST" action=" {{~#if isModerated~}} - {{~actions.reopen.url~}} + {{~actions.unlock.url~}} {{~else~}} - {{~actions.close.url~}} + {{~actions.lock.url~}} {{~/if~}}"> {{> flow_errors }} <input type="hidden" name="wpEditToken" value="{{@root.editToken}}" /> @@ -36,19 +36,19 @@ class="mw-ui-button mw-ui-constructive" data-flow-interactive-handler="apiRequest" data-flow-api-target="< .flow-topic-titlebar" - data-flow-api-handler="closeOpenTopic"> + data-flow-api-handler="lockTopic"> {{#if isModerated}} - {{l10n "flow-topic-action-reopen-topic"}} + {{l10n "flow-topic-action-unlock-topic"}} {{else}} - {{l10n "flow-topic-action-close-topic"}} + {{l10n "flow-topic-action-lock-topic"}} {{/if}} </button> {{> flow_form_buttons }} <small class="flow-terms-of-use plainlinks"> {{#if isModerated}} - {{l10nParse "flow-terms-of-use-reopen-topic"}} + {{l10nParse "flow-terms-of-use-unlock-topic"}} {{else}} - {{l10nParse "flow-terms-of-use-close-topic"}} + {{l10nParse "flow-terms-of-use-lock-topic"}} {{/if}} </small> </div> diff --git a/i18n/en.json b/i18n/en.json index 2bbeb6a..1d62586 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -31,7 +31,7 @@ "flow-post-moderated-toggle-suppress-hide": "Hide comment {{GENDER:$1|suppressed}} by $2", "flow-hide-post-content": "This comment was {{GENDER:$1|hidden}} by $1", "flow-hide-title-content": "This topic was {{GENDER:$1|hidden}} by $1", - "flow-close-title-content": "This topic was {{GENDER:$1|closed}} by $1", + "flow-lock-title-content": "This topic was {{GENDER:$1|locked}} by $1", "flow-hide-header-content": "{{GENDER:$1|Hidden}} by $2", "flow-hide-usertext": "$1", "flow-delete-post-content": "This comment was {{GENDER:$1|deleted}} by $1", @@ -62,7 +62,7 @@ "flow-reply-submit": "{{GENDER:$1|Reply}}", "flow-reply-link": "{{GENDER:$1|Reply}}", "flow-thank-link": "{{GENDER:$1|Thank}}", - "flow-close-link": "{{GENDER:$1|Close}}", + "flow-lock-link": "{{GENDER:$1|Lock}}", "flow-post-interaction-separator": " • ", "flow-post-edited": "Post {{GENDER:$1|edited}} by $1 $2", "flow-post-action-view": "Permalink", @@ -82,8 +82,8 @@ "flow-topic-action-history": "History", "flow-topic-action-hide-topic": "Hide topic", "flow-topic-action-delete-topic": "Delete topic", - "flow-topic-action-close-topic": "Close topic", - "flow-topic-action-reopen-topic": "Reopen topic", + "flow-topic-action-lock-topic": "Lock topic", + "flow-topic-action-unlock-topic": "Unlock topic", "flow-topic-action-summarize-topic": "Summarize", "flow-topic-action-resummarize-topic": "Edit summary", "flow-topic-action-suppress-topic": "Suppress topic", @@ -99,8 +99,8 @@ "flow-error-other": "An unexpected error occurred.", "flow-error-external": "An error occurred.<br />The error message received was: $1", "flow-error-edit-restricted": "You are not allowed to edit this post.", - "flow-error-topic-is-closed": "This topic is closed for any further activities.", - "flow-error-close-moderated-post": "You cannot close a moderated post.", + "flow-error-topic-is-locked": "This topic is locked for any further activities.", + "flow-error-lock-moderated-post": "You cannot lock a moderated post.", "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.", @@ -140,17 +140,17 @@ "flow-error-no-index": "Failed to find an index to perform data search.", "flow-error-no-render": "The specified action was not recognized.", "flow-error-no-commit": "The specified action could not be saved.", - "flow-error-fetch-after-open-close": "An error was encountered when requesting the new data. The open/close operation succeeded just fine, though. The error message was: $1", + "flow-error-fetch-after-lock": "An error was encountered when requesting the new data. The lock/unlock operation succeeded just fine, though. The error message was: $1", "flow-error-move": "Moving a discussion board is currently not supported.", "flow-edit-header-placeholder": "Describe this discussion board", "flow-edit-header-submit": "Save header", "flow-edit-header-submit-overwrite": "Overwrite header", "flow-summarize-topic-submit": "Summarize", "flow-summarize-topic-submit-overwrite": "Overwrite summary", - "flow-close-topic-submit": "Close topic", - "flow-close-topic-submit-overwrite": "Overwrite topic closing summary", - "flow-reopen-topic-submit": "Reopen topic", - "flow-reopen-topic-submit-overwrite": "Overwrite topic reopening summary", + "flow-lock-topic-submit": "Lock topic", + "flow-lock-topic-submit-overwrite": "Overwrite lock topic summary", + "flow-unlock-topic-submit": "Unlock topic", + "flow-unlock-topic-submit-overwrite": "Overwrite unlock topic summary", "flow-edit-title-submit": "Change title", "flow-edit-title-submit-overwrite": "Overwrite title", "flow-edit-post-submit": "Submit changes", @@ -192,8 +192,8 @@ "flow-rev-message-deleted-topic-irc": "$2 {{GENDER:$2|deleted}} the topic \"$6\" ($5)", "flow-rev-message-suppressed-topic": "$1 {{GENDER:$2|suppressed}} the [$4 topic] \"$6\" (<em>$5</em>)", "flow-rev-message-suppressed-topic-irc": "$2 {{GENDER:$2|suppressed}} the topic \"$6\" ($5)", - "flow-rev-message-closed-topic": "$1 {{GENDER:$2|closed}} the [$4 topic] $6 (<em>$5</em>)", - "flow-rev-message-closed-topic-irc": "$2 {{GENDER:$2|closed}} the topic $6 ($5)", + "flow-rev-message-locked-topic": "$1 {{GENDER:$2|locked}} the [$4 topic] $6 (<em>$5</em>)", + "flow-rev-message-locked-topic-irc": "$2 {{GENDER:$2|locked}} the topic $6 ($5)", "flow-rev-message-restored-topic": "$1 {{GENDER:$2|restored}} the [$4 topic] \"$6\" (<em>$5</em>)", "flow-rev-message-restored-topic-irc": "$2 {{GENDER:$2|restored}} the topic \"$6\" ($5)", "flow-rc-topic-of-board": "$1 on $2", @@ -309,7 +309,7 @@ "flow-topic-collapsed-full": "Collapsed view", "flow-topic-complete": "Full view", "right-flow-hide": "Hide Flow topics and posts", - "right-flow-close": "Close Flow topics", + "right-flow-lock": "Lock Flow topics", "right-flow-delete": "Delete Flow topics and posts", "right-flow-edit-post": "Edit Flow posts by other users", "right-flow-suppress": "Suppress Flow revisions", @@ -343,8 +343,8 @@ "flow-toggle-topics": "Switch to topics only view", "flow-toggle-topics-posts": "Switch to topics and posts view", "flow-terms-of-use-summarize": "By clicking \"{{int:flow-summarize-topic-submit}}\", you agree to the terms of use for this wiki.", - "flow-terms-of-use-close-topic": "By clicking \"{{int:flow-close-topic-submit}}\", you agree to the terms of use for this wiki.", - "flow-terms-of-use-reopen-topic": "By clicking \"{{int:flow-reopen-topic-submit}}\", you agree to the terms of use for this wiki.", + "flow-terms-of-use-lock-topic": "By clicking \"{{int:flow-lock-topic-submit}}\", you agree to the terms of use for this wiki.", + "flow-terms-of-use-unlock-topic": "By clicking \"{{int:flow-unlock-topic-submit}}\", you agree to the terms of use for this wiki.", "flow-whatlinkshere-post": "from a [$1 post]", "flow-whatlinkshere-header": "from the [$1 header]", "flow": "Flow", diff --git a/i18n/qqq.json b/i18n/qqq.json index a5d91af..4ede8c0 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -35,7 +35,7 @@ "flow-post-moderated-toggle-suppress-hide": "Message to display instead of content when a suppressed post has been hidden.\n\nParameters:\n* $1 - username that hid the title, can be used for GENDER\n* $2 - user link and tool links for the user\n{{Related|Flow-post-moderated-toggle}}", "flow-hide-post-content": "Message to display instead of content when the post has been hidden.\n\nParameters:\n* $1 - username that hid the post, can be used for GENDER\n{{Related|Flow-content}}", "flow-hide-title-content": "Message to display instead of content when the title has been hidden.\n\nParameters:\n* $1 - username that hid the title, can be used for GENDER\n{{Related|Flow-content}}", - "flow-close-title-content": "Message to display instead of content when the title has been closed.\n\nParameters:\n* $1 - username that closed the title, can be used for GENDER\n{{Related|Flow-content}}", + "flow-lock-title-content": "Message to display instead of content when the title has been locked.\n\nParameters:\n* $1 - username that locked the title, can be used for GENDER\n{{Related|Flow-content}}", "flow-hide-header-content": "Message to display instead of content when the header has been hidden.\n\nParameters:\n* $1 - username that hid the header, can be used for GENDER\n* $2 - user link and tool links for the user.\n{{Related|Flow-content}}", "flow-hide-usertext": "Used as username if the post was hidden.\n\nParameters:\n* $1 - Username of the post creator. Can be used for GENDER", "flow-delete-post-content": "Message to display instead of content when the post has been deleted.\n\nParameters:\n* $1 - username that deleted the post, can be used for GENDER\n{{Related|Flow-content}}", @@ -66,7 +66,7 @@ "flow-reply-submit": "Used as label for the Submit button. Parameters:\n* $1 - username, can be used for GENDER\nAlso used in:\n* {{msg-mw|Flow-terms-of-use-reply}}\n* {{msg-mw|Wikimedia-flow-terms-of-use-reply}}\n{{Identical|Reply}}", "flow-reply-link": "Text for the link that appears near the post and offers the user to reply to it. Clicking the link will display the reply editor. Parameters:\n* $1 - username, can be used for GENDER\n{{Identical|Reply}}", "flow-thank-link": "Link text of the button that will (when clicked) thank the editor of the comment Parameters:\n* $1 - username, can be used for GENDER\n{{Identical|Thank}}", - "flow-close-link": "Text for the link for closing topic/post. Parameters:\n* $1 - username, can be used for GENDER\n{{Identical|Close}}", + "flow-lock-link": "Text for the link for closing topic/post. Parameters:\n* $1 - username, can be used for GENDER\n{{Identical|Lock}}", "flow-post-interaction-separator": "{{optional}}", "flow-post-edited": "Text displayed to notify the user a post has been modified. Parameters:\n* $1 - username that created the most recent revision of the post\n* $2 - humanized timestamp, relative to now, of when the edit occurred; rendered by MWTimestamp::getHumanTimestamp", "flow-post-action-view": "Used as text for the link which is used to view.\n{{Identical|Permalink}}", @@ -86,7 +86,7 @@ "flow-topic-action-history": "Used as text for the link which is used to view topic-history.\n{{Identical|History}}", "flow-topic-action-hide-topic": "Used as a link in a dropdown menu to hide a topic.\n{{Related|Flow-action}}", "flow-topic-action-delete-topic": "Used as a link in a dropdown menu to delete a topic.\n{{Related|Flow-action}}", - "flow-topic-action-close-topic": "Used as a link in a dropdown menu to close a topic.\n{{Related|Flow-action}}", + "flow-topic-action-lock-topic": "Used as a link in a dropdown menu to lock a topic.\n{{Related|Flow-action}}", "flow-topic-action-reopen-topic": "Used as a link in a dropdown menu to reopen a topic.\n{{Related|Flow-action}}", "flow-topic-action-summarize-topic": "Used as a link in a dropdown menu to summarize a topic.\n{{Related|Flow-action}}\n{{Identical|Summarize}}", "flow-topic-action-resummarize-topic": "Used as a link in a dropdown menu to resummarize a topic.\n{{Related|Flow-action}}\n{{Identical|Edit summary}}", @@ -103,8 +103,8 @@ "flow-error-other": "Used as generic error message.", "flow-error-external": "Uses as error message. Parameters:\n* $1 - error message\nSee also:\n* {{msg-mw|Flow-error-external-multi}}", "flow-error-edit-restricted": "Used as error message when a user attempts to edit a post they do not have the permissions for.", - "flow-error-topic-is-closed": "Used as error message when a user attempts to moderate/create/edit title/post when a topic is closed.", - "flow-error-close-moderated-post": "Used as error message when user attempts to close a moderated topic/post.", + "flow-error-topic-is-locked": "Used as error message when a user attempts to moderate/create/edit title/post when a topic is locked.", + "flow-error-lock-moderated-post": "Used as error message when user attempts to 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}}", @@ -144,15 +144,15 @@ "flow-error-no-index": "Error message when failing to find an index to perform data search.", "flow-error-no-render": "Error message when nothing was able to render the request (data was requested but it could not be processed).", "flow-error-no-commit": "Error message when nothing was able to commit the request (data was submitted but it could not be processed).", - "flow-error-fetch-after-open-close": "Error message to be displayed when failing to request the new data after successfully performing open/close topic. This is meant to indicate to the user that some error was encountered, but that the open/close actually succeeded just fine - we just failed to get the new data to display the new status. Parameters:\n* $1 - The error message received.", + "flow-error-fetch-after-lock": "Error message to be displayed when failing to request the new data after successfully performing lock/unlock topic. This is meant to indicate to the user that some error was encountered, but that the lock/unlock actually succeeded just fine - we just failed to get the new data to display the new status. Parameters:\n* $1 - The error message received.", "flow-error-move": "Error message when attempting to move a flow board (which is not yet supported)", "flow-edit-header-placeholder": "Used as placeholder when editing the header of a Flow board", "flow-edit-header-submit": "Used as label for the Submit button.", "flow-edit-header-submit-overwrite": "Used as label for the Submit button, when submitting will overwrite a more recent change.", "flow-summarize-topic-submit": "Used as label for the Summarize button.\n\nAlso used in:\n* {{msg-mw|Flow-terms-of-use-summarize}}\n* {{msg-mw|Wikimedia-flow-terms-of-use-summarize}}\n{{Identical|Summarize}}", "flow-summarize-topic-submit-overwrite": "Used as label for the Summarize button, when submitting will overwrite a more recent summary.", - "flow-close-topic-submit": "Used as label for the Close topic button.\n\nAlso used in:\n* {{msg-mw|Flow-terms-of-use-close-topic}}\n* {{msg-mw|Wikimedia-flow-terms-of-use-close-topic}}", - "flow-close-topic-submit-overwrite": "Used as label for the Close topic button, when submitting will overwrite a more recent summary.", + "flow-lock-topic-submit": "Used as label for the Lock topic button.\n\nAlso used in:\n* {{msg-mw|Flow-terms-of-use-lock-topic}}\n* {{msg-mw|Wikimedia-flow-terms-of-use-lock-topic}}", + "flow-lock-topic-submit-overwrite": "Used as label for the Lock topic button, when submitting will overwrite a more recent summary.", "flow-reopen-topic-submit": "Used as label for the Restore topic button.\n\nAlso used in:\n* {{msg-mw|Flow-terms-of-use-reopen-topic}}\n* {{msg-mw|Wikimedia-flow-terms-of-use-reopen-topic}}", "flow-reopen-topic-submit-overwrite": "Used as label for the Restore topic button, when submitting will overwrite a more recent summary.", "flow-edit-title-submit": "Used as label for the Submit button.", @@ -196,8 +196,8 @@ "flow-rev-message-deleted-topic-irc": "{{notranslate}}", "flow-rev-message-suppressed-topic": "Used as revision comment when a topic has been suppressed.\n\nParameters:\n* $1 - user link and tool links for the user.\n* $2 - username of the user who moderated the topic. Can be used for GENDER\n* $3 - (Optional) username of the user who had posted the topic. Can be used for GENDER\n* $4 - permalink to the topic\n* $5 - Reason, from the moderating user, for moderating this topic\n* $6 - Name of the topic the post belongs to\n{{Related|Flow-rev-message}}", "flow-rev-message-suppressed-topic-irc": "{{notranslate}}", - "flow-rev-message-closed-topic": "Used as revision comment when a topic has been closed.\n\nParameters:\n* $1 - user link and tool links for the user.\n* $2 - username of the user who moderated the topic. Can be used for GENDER\n* $3 - (Optional) username of the user who had posted the topic. Can be used for GENDER\n* $4 - permalink to the topic\n* $5 - Reason, from the moderating user, for moderating this topic\n* $6 - Name of the topic the post belongs to\n{{Related|Flow-rev-message}}", - "flow-rev-message-closed-topic-irc": "{{notranslate}}", + "flow-rev-message-locked-topic": "Used as revision comment when a topic has been locked.\n\nParameters:\n* $1 - user link and tool links for the user.\n* $2 - username of the user who moderated the topic. Can be used for GENDER\n* $3 - (Optional) username of the user who had posted the topic. Can be used for GENDER\n* $4 - permalink to the topic\n* $5 - Reason, from the moderating user, for moderating this topic\n* $6 - Name of the topic the post belongs to\n{{Related|Flow-rev-message}}", + "flow-rev-message-locked-topic-irc": "{{notranslate}}", "flow-rev-message-restored-topic": "Used as revision comment when a topic has been restored (un-hidden).\n\nParameters:\n* $1 - user link and tool links for the user.\n* $2 - username of the user who restored the topic. Can be used for GENDER\n* $3 - (Optional) username of the user who had posted the topic. Can be used for GENDER\n* $4 - permalink to the topic\n* $5 - Reason, from the moderating user, for moderating this topic\n* $6 - Name of the topic the post belongs to\n{{Related|Flow-rev-message}}", "flow-rev-message-restored-topic-irc": "{{notranslate}}", "flow-rc-topic-of-board": "Part of an entry in RecentChanges, the text for the link to the topic.\n\nParameters:\n* $1 - topic title text.\n* $2 - board name text.\n{{Identical|On}}", @@ -313,7 +313,7 @@ "flow-topic-collapsed-full": "Used as title for the icon which is used to show collapsed view of topics.", "flow-topic-complete": "Used as title for the icon which is used to show full view of topics.\n{{Identical|Full view}}", "right-flow-hide": "{{doc-right|flow-hide}}", - "right-flow-close": "{{doc-right|flow-close}}", + "right-flow-lock": "{{doc-right|flow-lock}}", "right-flow-delete": "{{doc-right|flow-delete}}", "right-flow-edit-post": "{{doc-right|flow-edit-post}}", "right-flow-suppress": "{{doc-right|flow-suppress}}", @@ -347,7 +347,7 @@ "flow-toggle-topics": "Tooltip displayed when mouse hovering over the full page topic collapser. When clicked posts are not displayed, only topic titles and metadata are visible.", "flow-toggle-topics-posts": "Tooltip displayed when mouse hovering over the full page topic collapser. When clicked posts will be displayed with topic titles.", "flow-terms-of-use-summarize": "Terms of use for summarizing a header/topic/post.\n\nRefers to {{msg-mw|Flow-summarize-topic-submit}}.\n{{Related|Flow-terms-of-use}}", - "flow-terms-of-use-close-topic": "Terms of use for closing a topic.\n\nRefers to {{msg-mw|Flow-close-topic-submit}}.\n{{Related|Flow-terms-of-use}}", + "flow-terms-of-use-lock-topic": "Terms of use for closing a topic.\n\nRefers to {{msg-mw|Flow-lock-topic-submit}}.\n{{Related|Flow-terms-of-use}}", "flow-terms-of-use-reopen-topic": "Terms of use for restoring a topic.\n\nRefers to {{msg-mw|Flow-reopen-topic-submit}}.\n{{Related|Flow-terms-of-use}}", "flow-whatlinkshere-post": "Displayed in parentheses on [[Special:WhatLinksHere]] for an entry that relates to a Flow post.\n\nParameters:\n* $1 - a URL to the post\nSee also:\n* {{msg-mw|Flow-whatlinkshere-header}}", "flow-whatlinkshere-header": "Displayed in parentheses on [[Special:WhatLinksHere]] for an entry that relates to a Flow Board header.\n\nParameters:\n* $1 - a URL to the header\nSee also:\n* {{msg-mw|Flow-whatlinkshere-post}}", diff --git a/includes/Actions/CloseTopicAction.php b/includes/Actions/CloseTopicAction.php deleted file mode 100644 index f89aebd..0000000 --- a/includes/Actions/CloseTopicAction.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -namespace Flow\Actions; - -use IContextSource; -use Page; - -class CloseTopicAction extends FlowAction { - function __construct( Page $page, IContextSource $context ) { - parent::__construct( $page, $context, 'close-open-topic' ); - } -} \ No newline at end of file diff --git a/includes/Actions/LockTopicAction.php b/includes/Actions/LockTopicAction.php new file mode 100644 index 0000000..bfd0bed --- /dev/null +++ b/includes/Actions/LockTopicAction.php @@ -0,0 +1,12 @@ +<?php + +namespace Flow\Actions; + +use IContextSource; +use Page; + +class LockTopicAction extends FlowAction { + function __construct( Page $page, IContextSource $context ) { + parent::__construct( $page, $context, 'lock-topic' ); + } +} diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php index da363c8..a3b66fb 100644 --- a/includes/Block/Topic.php +++ b/includes/Block/Topic.php @@ -59,8 +59,8 @@ // Moderation 'moderate-topic', 'moderate-post', - // Close or open topic - 'close-open-topic', + // lock or unlock topic + 'lock-topic', // Other stuff 'edit-title', ); @@ -68,7 +68,7 @@ protected $supportedGetActions = array( 'reply', 'view', 'history', 'edit-post', 'edit-title', 'compare-post-revisions', 'single-view', 'view-topic', 'view-post', - 'moderate-topic', 'moderate-post', 'close-open-topic', + 'moderate-topic', 'moderate-post', 'lock-topic', ); // @Todo - fill in the template names @@ -82,10 +82,10 @@ 'compare-post-revisions' => 'diff_view', 'moderate-topic' => 'moderate_topic', 'moderate-post' => 'moderate_post', - 'close-open-topic' => 'close', + 'lock-topic' => 'lock', ); - protected $requiresWikitext = array( 'edit-post', 'edit-title', 'close-open-topic' ); + protected $requiresWikitext = array( 'edit-post', 'edit-title', 'lock-topic' ); /** * @var RevisionActionPermissions $permissions Allows or denies actions to be performed @@ -111,21 +111,21 @@ } protected function validate() { - // If the topic is closed, the only allowed action is to reopen it $topicTitle = $this->loadTopicTitle(); if ( !$topicTitle ) { // permissions issue, self::loadTopicTitle should have added appropriate // error messages already. return; } + // If the topic is locked, the only allowed action is to unlock it if ( - $topicTitle->isClosed() + $topicTitle->isLocked() && ( - $this->action !== 'close-open-topic' - || $this->submitted['moderationState'] !== 'reopen' + $this->action !== 'lock-topic' + || $this->submitted['moderationState'] !== 'unlock' ) ) { - $this->addError( 'moderate', wfMessage( 'flow-error-topic-is-closed' ) ); + $this->addError( 'moderate', wfMessage( 'flow-error-topic-is-locked' ) ); } switch( $this->action ) { @@ -138,7 +138,7 @@ break; case 'moderate-topic': - case 'close-open-topic': + case 'lock-topic': $this->validateModerateTopic(); break; @@ -265,8 +265,11 @@ } protected function doModerate( PostRevision $post ) { - if ( $this->submitted['moderationState'] === 'close' && $post->isModerated() ) { - $this->addError( 'moderate', wfMessage( 'flow-error-close-moderated-post' ) ); + if ( + $this->submitted['moderationState'] === AbstractRevision::MODERATED_LOCKED + && $post->isModerated() + ) { + $this->addError( 'moderate', wfMessage( 'flow-error-lock-moderated-post' ) ); return; } @@ -288,7 +291,7 @@ } // these all just mean set to no moderation, it returns a post to unmoderated status - $allowedRestoreAliases = array( 'reopen', 'unhide', 'undelete', 'unsuppress' ); + $allowedRestoreAliases = array( 'unlock', 'unhide', 'undelete', 'unsuppress' ); if ( in_array( $moderationState, $allowedRestoreAliases ) ) { $moderationState = 'restore'; } @@ -388,7 +391,7 @@ switch( $this->action ) { case 'reply': case 'moderate-topic': - case 'close-open-topic': + case 'lock-topic': case 'restore-post': case 'moderate-post': case 'edit-title': @@ -457,7 +460,7 @@ throw new InvalidInputException( 'A revision must be provided', 'invalid-input' ); } $output = $this->renderSingleViewAPI( $revId ); - } elseif ( $this->action === 'close-open-topic' ) { + } elseif ( $this->action === 'lock-topic' ) { // Treat topic as a post, only the post + summary are needed $result = $this->renderPostAPI( $templating, $options, $this->workflow->getId() ); $topicId = $result['roots'][0]; @@ -768,7 +771,7 @@ * @param \OutputPage $out * * @todo Provide more informative page title for actions other than view, - * e.g. "Hide post in <TITLE>", "Reopen <TITLE>", etc. + * e.g. "Hide post in <TITLE>", "Unlock <TITLE>", etc. */ public function setPageTitle( Templating $templating, \OutputPage $out ) { $topic = $this->loadTopicTitle( $this->action === 'history' ? 'history' : 'view' ); diff --git a/includes/Block/TopicSummary.php b/includes/Block/TopicSummary.php index 08d239a..b126676 100644 --- a/includes/Block/TopicSummary.php +++ b/includes/Block/TopicSummary.php @@ -46,7 +46,7 @@ /** * @var string[] */ - protected $supportedPostActions = array( 'edit-topic-summary', 'close-open-topic' ); + protected $supportedPostActions = array( 'edit-topic-summary', 'lock-topic' ); /** * @var string[] @@ -63,7 +63,7 @@ 'view-topic-summary' => 'single_view', 'compare-postsummary-revisions' => 'diff_view', 'edit-topic-summary' => 'edit', - 'close-open-topic' => 'close', + 'lock-topic' => 'lock', ); /** @@ -91,8 +91,8 @@ $this->validateTopicSummary(); break; - case 'close-open-topic': - if ( !$this->isCloseOpenTopic() ) { + case 'lock-topic': + if ( !$this->isLockTopic() ) { $this->addError( 'moderate', wfMessage( 'flow-error-invalid-moderation-state' ) ); return; } @@ -107,15 +107,15 @@ /** * Check if this is closing/restoring a topic */ - protected function isCloseOpenTopic() { + protected function isLockTopic() { $state = isset( $this->submitted['moderationState'] ) ? $this->submitted['moderationState'] : ''; - if ( $state == AbstractRevision::MODERATED_CLOSED ) { + if ( $state == AbstractRevision::MODERATED_LOCKED ) { return true; } $root = $this->findTopicTitle(); if ( - $root->getModerationState() == AbstractRevision::MODERATED_CLOSED && - $state == 'reopen' ) + $root->getModerationState() == AbstractRevision::MODERATED_LOCKED && + $state == 'unlock' ) { return true; } @@ -236,7 +236,7 @@ public function commit() { switch( $this->action ) { case 'edit-topic-summary': - case 'close-open-topic': + case 'lock-topic': return $this->saveTopicSummary(); break; diff --git a/includes/Formatter/RecentChangesQuery.php b/includes/Formatter/RecentChangesQuery.php index 1860038..f1dd203 100644 --- a/includes/Formatter/RecentChangesQuery.php +++ b/includes/Formatter/RecentChangesQuery.php @@ -175,7 +175,7 @@ case 'suppress-topic': case 'restore-post': case 'restore-topic': - case 'close-topic': + case 'lock-topic': // moderation actions are always shown when visible to the user return false; diff --git a/includes/Formatter/RevisionFormatter.php b/includes/Formatter/RevisionFormatter.php index 5d4d9ee..60a5c9a 100644 --- a/includes/Formatter/RevisionFormatter.php +++ b/includes/Formatter/RevisionFormatter.php @@ -453,10 +453,6 @@ ->editPostAction( $title, $workflowId, $postId, $revId ); break; - case 'lock': - // @todo - break; - case 'hide-post': if ( !$postId ) { throw new FlowException( "$type called without \$postId" ); @@ -486,20 +482,20 @@ $links['suppress'] = $this->urlGenerator->suppressPostAction( $title, $workflowId, $postId ); break; - case 'close-topic': - // close topic link is only available to topic workflow + case 'lock-topic': + // lock topic link is only available to topic workflow if( !in_array( $workflow->getType(), array( 'topic', 'topicsummary' ) ) ) { continue; } - $links['close'] = $this->urlGenerator->closeTopicAction( $title, $workflowId ); + $links['lock'] = $this->urlGenerator->lockTopicAction( $title, $workflowId ); break; case 'restore-topic': $moderateAction = $flowAction = null; switch ( $revision->getModerationState() ) { - case AbstractRevision::MODERATED_CLOSED: - $moderateAction = 'reopen'; - $flowAction = 'close-open-topic'; + case AbstractRevision::MODERATED_LOCKED: + $moderateAction = 'unlock'; + $flowAction = 'lock-topic'; break; case AbstractRevision::MODERATED_HIDDEN: case AbstractRevision::MODERATED_DELETED: diff --git a/includes/Model/AbstractRevision.php b/includes/Model/AbstractRevision.php index 0978629..89df9d6 100644 --- a/includes/Model/AbstractRevision.php +++ b/includes/Model/AbstractRevision.php @@ -14,7 +14,7 @@ const MODERATED_HIDDEN = 'hide'; const MODERATED_DELETED = 'delete'; const MODERATED_SUPPRESSED = 'suppress'; - const MODERATED_CLOSED = 'close'; + const MODERATED_LOCKED = 'lock'; /** * List of available permission levels. @@ -26,7 +26,7 @@ self::MODERATED_HIDDEN, self::MODERATED_DELETED, self::MODERATED_SUPPRESSED, - self::MODERATED_CLOSED, + self::MODERATED_LOCKED, ); /** @@ -204,6 +204,8 @@ // Backwards compatibility if ( $obj->moderationState == 'censor' ) { $obj->moderationState = self::MODERATED_SUPPRESSED; + } elseif ( $obj->moderationState === 'close' ) { + $obj->moderationState = self::MODERATED_LOCKED; } // isset required because there is a possible db migration, cached data will not have it @@ -583,8 +585,8 @@ /** * @return boolean */ - public function isClosed() { - return $this->moderationState === self::MODERATED_CLOSED; + public function isLocked() { + return $this->moderationState === self::MODERATED_LOCKED; } /** diff --git a/includes/UrlGenerator.php b/includes/UrlGenerator.php index 095f56c..3ad039b 100644 --- a/includes/UrlGenerator.php +++ b/includes/UrlGenerator.php @@ -388,19 +388,19 @@ } /** - * Close the specified topic + * Lock the specified topic * * @param Title|null $title * @param UUID $workflowId * @return Anchor */ - public function closeTopicAction( Title $title = null, UUID $workflowId ) { + public function lockTopicAction( Title $title = null, UUID $workflowId ) { return new Anchor( - wfMessage( 'flow-topic-action-close-topic' ), + wfMessage( 'flow-topic-action-lock-topic' ), $this->resolveTitle( $title, $workflowId ), array( - 'action' => 'close-open-topic', - 'flow_moderationState' => 'close', + 'action' => 'lock-topic', + 'flow_moderationState' => AbstractRevision::MODERATED_LOCKED, ) ); } diff --git a/includes/api/ApiFlow.php b/includes/api/ApiFlow.php index de7a180..05206d7 100644 --- a/includes/api/ApiFlow.php +++ b/includes/api/ApiFlow.php @@ -19,7 +19,7 @@ 'moderate-post' => 'ApiFlowModeratePost', 'moderate-topic' => 'ApiFlowModerateTopic', 'edit-title' => 'ApiFlowEditTitle', - 'close-open-topic' => 'ApiFlowCloseOpenTopic', + 'lock-topic' => 'ApiFlowLockTopic', // GET // action 'view' exists in Topic.php & TopicList.php, for topic, post & diff --git a/includes/api/ApiFlowCloseOpenTopic.php b/includes/api/ApiFlowLockTopic.php similarity index 73% rename from includes/api/ApiFlowCloseOpenTopic.php rename to includes/api/ApiFlowLockTopic.php index f18bda5..38450f7 100644 --- a/includes/api/ApiFlowCloseOpenTopic.php +++ b/includes/api/ApiFlowLockTopic.php @@ -2,7 +2,7 @@ use Flow\Model\AbstractRevision; -class ApiFlowCloseOpenTopic extends ApiFlowBasePost { +class ApiFlowLockTopic extends ApiFlowBasePost { public function __construct( $api, $modName ) { parent::__construct( $api, $modName, 'cot' ); @@ -13,14 +13,14 @@ } protected function getAction() { - return 'close-open-topic'; + return 'lock-topic'; } public function getAllowedParams() { return array( 'moderationState' => array( ApiBase::PARAM_REQUIRED => true, - ApiBase::PARAM_TYPE => array( AbstractRevision::MODERATED_CLOSED, 'reopen' ), + ApiBase::PARAM_TYPE => array( AbstractRevision::MODERATED_LOCKED, 'unlock' ), ), 'summary' => array( ApiBase::PARAM_REQUIRED => true, @@ -38,12 +38,12 @@ } public function getDescription() { - return 'Close or open a Flow topic'; + return 'Lock or unlock a Flow topic'; } public function getExamples() { return array( - 'api.php?action=flow&submodule=close-open-topic&cotmoderationState=close&cotsummary=Ahhhh&cotprev_revision=xjs&workflow=', + 'api.php?action=flow&submodule=lock-topic&cotmoderationState=lock&cotsummary=Ahhhh&cotprev_revision=xjs&workflow=', ); } } diff --git a/modules/new/components/flow-board.js b/modules/new/components/flow-board.js index 088dc23..f22b2c8 100644 --- a/modules/new/components/flow-board.js +++ b/modules/new/components/flow-board.js @@ -363,14 +363,14 @@ }; /** - * Before activating close/reopen edit form, sends an overrideObject + * Before activating lock/unlock edit form, sends an overrideObject * to the API to modify the request params. * @param {Event} event * @return {Object} */ - FlowBoardComponent.UI.events.apiPreHandlers.activateCloseOpenTopic = function ( event ) { + FlowBoardComponent.UI.events.apiPreHandlers.activateLockTopic = function ( event ) { return { - // href submodule is close-open-topic + // href submodule is lock-topic submodule: 'view-post', // href does not have this param vpcontentFormat: 'wikitext', @@ -536,13 +536,13 @@ }; /** - * Renders the editable close/open text area with the given API response. - * Allows a user to close or reopen an entire topic. + * Renders the editable lock/unlock text area with the given API response. + * Allows a user to lock or unlock an entire topic. * @param {Object} info * @param {Object} data * @param {jqXHR} jqxhr */ - FlowBoardComponent.UI.events.apiHandlers.activateCloseOpenTopic = function ( info, data ) { + FlowBoardComponent.UI.events.apiHandlers.activateLockTopic = function ( info, data ) { var result, revision, postId, revisionId, $target = info.$target, $old = $target, @@ -563,7 +563,7 @@ // Enable the editable summary $target = $( flowBoard.TemplateEngine.processTemplateGetFragment( - 'flow_topic_titlebar_close', revision + 'flow_topic_titlebar_lock', revision ) ).children(); // Ensure that on a cancel the form gets destroyed. @@ -581,13 +581,13 @@ }; /** - * After submit of the close/open topic form, process the new summary data and re-render + * After submit of the lock/unlock topic form, process the new summary data and re-render * the title bar. * @param {String} status * @param {Object} data * @param {jqXHR} jqxhr */ - FlowBoardComponent.UI.events.apiHandlers.closeOpenTopic = function ( info, data ) { + FlowBoardComponent.UI.events.apiHandlers.lockTopic = function ( info, data ) { var revision, $target = info.$target, $topicTitleBar, topicId, revisionId, @@ -600,12 +600,12 @@ return; } - // We couldn't make close-open-topic to return topic data after a successful - // post submission because close-open-topic is used for no-js support as well. + // We couldn't make lock-topic to return topic data after a successful + // post submission because lock-topic is used for no-js support as well. // If we make it return topic data, that means it has to return wikitext format // for edit form in no-js mode. This is a performance problem for wikitext // conversion since topic data returns all children data as well. So we need to - // make close-open-topic return a single post for topic then fire + // make lock-topic return a single post for topic then fire // another request to topic data in html format // // @todo the html could json encode the parameters including topics, the js @@ -626,7 +626,7 @@ revision = result.revisions[revisionId]; // FIXME: Api should be returning moderation state. Why not? - revision.isModerated = revision.moderateState === 'close'; + revision.isModerated = revision.moderateState === 'lock'; // FIXME: Hackily remove the moderated class (avoids re-rendering entire post) $target.parents( '.flow-topic' ).removeClass( 'flow-topic-moderated' ); @@ -642,12 +642,12 @@ FlowBoardComponent.UI.makeContentInteractive( $topicTitleBar ); } ).fail( function( code, result ) { /* - * At this point, the open/close actually worked, but failed + * At this point, the lock/unlock actually worked, but failed * fetching the new data to be displayed. */ FlowBoardComponent.UI.removeError( $target ); var errorMsg = apiErrorMessage( code, result ); - errorMsg = mw.msg( 'flow-error-fetch-after-open-close', errorMsg ); + errorMsg = mw.msg( 'flow-error-fetch-after-open-lock', errorMsg ); FlowBoardComponent.UI.showError( $target, errorMsg ); } ); }; diff --git a/modules/new/flow-api.js b/modules/new/flow-api.js index 7693c16..6e7da1c 100644 --- a/modules/new/flow-api.js +++ b/modules/new/flow-api.js @@ -16,7 +16,7 @@ 'reply': [ 'topic_', 'rep' ], 'moderate-topic': [ 'topic_', 'mt' ], 'edit-title': [ 'topic_', 'et' ], - 'close-open-topic': [ 'topic_', 'cot' ], + 'lock-topic': [ 'topic_', 'cot' ], 'view-topiclist': [ 'topiclist_', 'vtl' ], 'view-post': [ 'topic', 'vp' ], 'view-topic': [ 'topic', 'vt' ], diff --git a/modules/new/styles/board/moderated.less b/modules/new/styles/board/moderated.less index cde31bd..6206b9f 100644 --- a/modules/new/styles/board/moderated.less +++ b/modules/new/styles/board/moderated.less @@ -3,8 +3,8 @@ @import 'flow.helpers'; // Visually mark moderated comments and posts -// Closed and deleted are inverted (white bg) -.flow-topic-moderatestate-close, +// Locked and deleted are inverted (white bg) +.flow-topic-moderatestate-lock, .flow-topic-moderatestate-delete { color: @colorTextLight; diff --git a/tests/browser/.bundle/config b/tests/browser/.bundle/config new file mode 100644 index 0000000..4a151cf --- /dev/null +++ b/tests/browser/.bundle/config @@ -0,0 +1,3 @@ +--- +BUNDLE_PATH: .gem +BUNDLE_DISABLE_SHARED_GEMS: '1' diff --git a/tests/browser/features/close_reopen_topics.feature b/tests/browser/features/lock_unlock_topics.feature similarity index 64% rename from tests/browser/features/close_reopen_topics.feature rename to tests/browser/features/lock_unlock_topics.feature index 4560363..613e93c 100644 --- a/tests/browser/features/close_reopen_topics.feature +++ b/tests/browser/features/lock_unlock_topics.feature @@ -1,42 +1,42 @@ @chrome @clean @ee-prototype.wmflabs.org @en.wikipedia.beta.wmflabs.org @firefox @login @test2.wikipedia.org -Feature: Close and open topics +Feature: Lock and unlock topics Background: Given I am logged in @internet_explorer_10 - Scenario: Closing a topic and then changing your mind + Scenario: Locking a topic and then changing your mind Given I am on Flow page And I have created a Flow topic When I click the Topic Actions link - And I click the Close topic button - And I cancel the close/reopen topic form + And I click the Lock topic button + And I cancel the lock/unlock topic form And the page has re-rendered Then the top post is an open discussion - And I do not see the close/reopen form + And I do not see the lock/unlock form @internet_explorer_10 - Scenario: Closing a topic + Scenario: Locking a topic Given I am on Flow page And I have created a Flow topic When I click the Topic Actions link - And I click the Close topic button + And I click the Lock topic button And I type "This is a bikeshed" as the reason - And I submit the close/reopen topic form + And I submit the lock/unlock topic form And the page has re-rendered - Then the top post is a closed discussion + Then the top post is a locked discussion And I expand the top post And the topic summary of the first topic is "This is a bikeshed" - # Close-then-reopen doesn't work in IE, it caches the API response (bug 69160). + # Close-then-unlock doesn't work in IE, it caches the API response (bug 69160). Scenario: Opening a topic Given I am on Flow page And I have created a Flow topic - And the top post has been closed + And the top post has been locked And I click the Topic Actions link - And I click the Reopen topic button + And I click the Unlock topic button When I type "Fun discussion" as the reason - And I submit the close/reopen topic form + And I submit the lock/unlock topic form And the page has re-rendered Then the top post is an open discussion And I expand the top post diff --git a/tests/browser/features/step_definitions/close_reopen_topics_steps.rb b/tests/browser/features/step_definitions/close_reopen_topics_steps.rb deleted file mode 100644 index d1af695..0000000 --- a/tests/browser/features/step_definitions/close_reopen_topics_steps.rb +++ /dev/null @@ -1,56 +0,0 @@ -Given(/^the page has re-rendered$/) do - sleep 10 -end - -Given(/^the top post has been closed$/) do - step 'I click the Topic Actions link' - step 'I click the Close topic button' - step 'I type "This is a bikeshed" as the reason' - step 'I submit the close/reopen topic form' - step 'the page has re-rendered' -end - -Given(/^I click the Close topic button$/) do - on(FlowPage).topic_close_button_element.when_present.click -end - -Given(/^I click the Reopen topic button$/) do - on(FlowPage).topic_reopen_button_element.when_present.click -end - -When(/^I type "(.*?)" as the reason$/) do |reason| - on(FlowPage).topic_close_form_reason_element.when_present.clear() - # Focus textarea so that any menus that have been clicked lose their focus. In Chrome these might disrupt the test as - # elements may be masked and not clickable. - on(FlowPage).topic_close_form_reason_element.click - on(FlowPage).topic_close_form_reason_element.send_keys(reason) -end - -When(/^I cancel the close\/reopen topic form$/) do - on(FlowPage).topic_close_form_cancel_button_element.when_present.click -end - -When(/^I submit the close\/reopen topic form$/) do - on(FlowPage).topic_close_form_close_button_element.when_present.click -end - -Then(/^the top post is a closed discussion$/) do - on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should be_visible -end - -Then(/^the top post is an open discussion$/) do - on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present -end - -Then(/^the topic summary of the first topic is "(.*?)"$/) do |text| - on(FlowPage).flow_first_topic_summary_element.text.should match text -end - -Then(/^I expand the top post$/) do - on(FlowPage).flow_first_topic_heading_element.when_present.click -end - -Then(/^I do not see the close\/reopen form$/) do - on(FlowPage).topic_close_form_element.when_not_present -end - diff --git a/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb new file mode 100644 index 0000000..ebd0d2d --- /dev/null +++ b/tests/browser/features/step_definitions/lock_unlock_topics_steps.rb @@ -0,0 +1,56 @@ +Given(/^the page has re-rendered$/) do + sleep 10 +end + +Given(/^the top post has been locked$/) do + step 'I click the Topic Actions link' + step 'I click the Lock topic button' + step 'I type "This is a bikeshed" as the reason' + step 'I submit the lock/unlock topic form' + step 'the page has re-rendered' +end + +Given(/^I click the Lock topic button$/) do + on(FlowPage).topic_lock_button_element.when_present.click +end + +Given(/^I click the Unlock topic button$/) do + on(FlowPage).topic_unlock_button_element.when_present.click +end + +When(/^I type "(.*?)" as the reason$/) do |reason| + on(FlowPage).topic_lock_form_reason_element.when_present.clear() + # Focus textarea so that any menus that have been clicked lose their focus. In Chrome these might disrupt the test as + # elements may be masked and not clickable. + on(FlowPage).topic_lock_form_reason_element.click + on(FlowPage).topic_lock_form_reason_element.send_keys(reason) +end + +When(/^I cancel the lock\/unlock topic form$/) do + on(FlowPage).topic_lock_form_cancel_button_element.when_present.click +end + +When(/^I submit the lock\/unlock topic form$/) do + on(FlowPage).topic_lock_form_lock_button_element.when_present.click +end + +Then(/^the top post is a locked discussion$/) do + on(FlowPage).flow_first_topic_moderation_msg_element.when_present.should be_visible +end + +Then(/^the top post is an open discussion$/) do + on(FlowPage).flow_first_topic_moderation_msg_element.when_not_present +end + +Then(/^the topic summary of the first topic is "(.*?)"$/) do |text| + on(FlowPage).flow_first_topic_summary_element.text.should match text +end + +Then(/^I expand the top post$/) do + on(FlowPage).flow_first_topic_heading_element.when_present.click +end + +Then(/^I do not see the lock\/unlock form$/) do + on(FlowPage).topic_lock_form_element.when_not_present +end + diff --git a/tests/browser/features/support/pages/flow_page.rb b/tests/browser/features/support/pages/flow_page.rb index ca8b362..edaddcd 100644 --- a/tests/browser/features/support/pages/flow_page.rb +++ b/tests/browser/features/support/pages/flow_page.rb @@ -108,18 +108,18 @@ a(:edit_title_button) do |page| page.topic_actions_menu_element.link_element(text: "Edit title") end - a(:topic_close_button) do |page| - page.topic_actions_menu_element.link_element(title: "Close topic") + a(:topic_lock_button) do |page| + page.topic_actions_menu_element.link_element(title: "Lock topic") end - a(:topic_reopen_button) do |page| - page.topic_actions_menu_element.link_element(title: "Reopen topic") + a(:topic_unlock_button) do |page| + page.topic_actions_menu_element.link_element(title: "Unlock topic") end - ## Close topic workflow - form(:topic_close_form, css: ".flow-edit-form") - textarea(:topic_close_form_reason, css: ".flow-edit-form textarea") - button(:topic_close_form_close_button, css: ".flow-edit-form .mw-ui-constructive") - button(:topic_close_form_cancel_button, css: ".flow-edit-form .mw-ui-destructive") + ## Lock topic workflow + form(:topic_lock_form, css: ".flow-edit-form") + textarea(:topic_lock_form_reason, css: ".flow-edit-form textarea") + button(:topic_lock_form_lock_button, css: ".flow-edit-form .mw-ui-constructive") + button(:topic_lock_form_cancel_button, css: ".flow-edit-form .mw-ui-destructive") ### Editing title of first topic text_field(:title_edit, css: ".flow-topic-titlebar form .mw-ui-input", index: 0) diff --git a/tests/phpunit/PermissionsTest.php b/tests/phpunit/PermissionsTest.php index bf3f2c8..da81848 100644 --- a/tests/phpunit/PermissionsTest.php +++ b/tests/phpunit/PermissionsTest.php @@ -98,7 +98,7 @@ array( $this->anonUser(), $this->post(), 'edit-post', false ), array( $this->anonUser(), $this->post(), 'hide-post', false ), array( $this->anonUser(), $this->topic(), 'hide-topic', false ), - array( $this->anonUser(), $this->topic(), 'close-topic', false ), + array( $this->anonUser(), $this->topic(), 'lock-topic', false ), array( $this->anonUser(), $this->post(), 'delete-post', false ), array( $this->anonUser(), $this->topic(), 'delete-topic', false ), array( $this->anonUser(), $this->post(), 'suppress-post', false ), @@ -117,7 +117,7 @@ array( $this->unconfirmedUser(), $this->post(), 'edit-post', true ), // can edit own post array( $this->unconfirmedUser(), $this->post(), 'hide-post', true ), array( $this->unconfirmedUser(), $this->topic(), 'hide-topic', true ), - array( $this->unconfirmedUser(), $this->topic(), 'close-topic', true ), + array( $this->unconfirmedUser(), $this->topic(), 'lock-topic', true ), array( $this->unconfirmedUser(), $this->post(), 'delete-post', false ), array( $this->unconfirmedUser(), $this->topic(), 'delete-topic', false ), array( $this->unconfirmedUser(), $this->post(), 'suppress-post', false ), @@ -148,7 +148,7 @@ array( $this->confirmedUser(), $this->topic(), 'hide-topic', true ), array( $this->confirmedUser(), $this->post(), 'delete-post', false ), array( $this->confirmedUser(), $this->topic(), 'delete-topic', false ), - array( $this->confirmedUser(), $this->topic(), 'close-topic', true ), + array( $this->confirmedUser(), $this->topic(), 'lock-topic', true ), array( $this->confirmedUser(), $this->post(), 'suppress-post', false ), array( $this->confirmedUser(), $this->topic(), 'suppress-topic', false ), array( $this->confirmedUser(), $this->post(), 'restore-post', false ), // $this->post is not hidden @@ -171,7 +171,7 @@ array( $this->sysopUser(), $this->post(), 'edit-post', true ), array( $this->sysopUser(), $this->post(), 'hide-post', true ), array( $this->sysopUser(), $this->topic(), 'hide-topic', true ), - array( $this->sysopUser(), $this->topic(), 'close-topic', true ), + array( $this->sysopUser(), $this->topic(), 'lock-topic', true ), array( $this->sysopUser(), $this->post(), 'delete-post', true ), array( $this->sysopUser(), $this->topic(), 'delete-topic', true ), array( $this->sysopUser(), $this->post(), 'suppress-post', false ), @@ -196,7 +196,7 @@ array( $this->oversightUser(), $this->post(), 'edit-post', false ), array( $this->oversightUser(), $this->post(), 'hide-post', true ), array( $this->oversightUser(), $this->topic(), 'hide-topic', true ), - array( $this->oversightUser(), $this->topic(), 'close-topic', true ), + array( $this->oversightUser(), $this->topic(), 'lock-topic', true ), array( $this->oversightUser(), $this->post(), 'delete-post', true ), array( $this->oversightUser(), $this->topic(), 'delete-topic', true ), array( $this->oversightUser(), $this->post(), 'suppress-post', true ), -- To view, visit https://gerrit.wikimedia.org/r/158634 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07dec52b95f1439030a6661afa15d6ad733a60d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits