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

Change subject: HACK: Hide reply form for locked topics
......................................................................


HACK: Hide reply form for locked topics

See bug for discussion.

Bug: T135848
Change-Id: I8331c5ae6727635a082ca964a243e567018dc459
(cherry picked from commit a0c30cd757c6aadc82e2df45ca33c26f140a98c3)
---
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/compiled/flow_post.handlebars.php
M handlebars/flow_reply_form.partial.handlebars
6 files changed, 17 insertions(+), 10 deletions(-)

Approvals:
  Dereckson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/handlebars/compiled/flow_block_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic.handlebars.php
index f685f6b..460a884 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -160,7 +160,8 @@
 '.$sp.'
 '.$sp.'>
 '.$sp.''.((LCRun3::ifvar($cx, ((isset($in['msg']) && is_array($in)) ? 
$in['msg'] : null))) ? ''.LCRun3::ch($cx, 'l10n', 
array(array(((isset($in['msg']) && is_array($in)) ? $in['msg'] : 
null)),array()), 'encq').'' : ''.LCRun3::ch($cx, 'l10n', 
array(array('flow-cancel'),array()), 'encq').'').'</button>
-';},'flow_reply_form' => function ($cx, $in, $sp) {return ''.$sp.'<form 
class="flow-post flow-reply-form"
+';},'flow_reply_form' => function ($cx, $in, $sp) {return 
''.$sp.''.((!LCRun3::ifvar($cx, ((isset($in['actions']['unlock']) && 
is_array($in['actions'])) ? $in['actions']['unlock'] : null))) ? '
+'.$sp.'<form class="flow-post flow-reply-form"
 '.$sp.'      method="POST"
 '.$sp.'      
action="'.htmlentities((string)((isset($in['actions']['reply']['url']) && 
is_array($in['actions']['reply'])) ? $in['actions']['reply']['url'] : null), 
ENT_QUOTES, 'UTF-8').'"
 '.$sp.'      id="flow-reply-'.htmlentities((string)((isset($in['postId']) && 
is_array($in)) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
@@ -190,7 +191,7 @@
 '.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()), 
'                ').'            <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-reply'),array()), 'encq').'</small>
 '.$sp.'        </div>
 '.$sp.'</form>
-';},'flow_topic' => function ($cx, $in, $sp) {return ''.$sp.'<div 
class="flow-topic flow-load-interactive'.((LCRun3::ifvar($cx, 
((isset($in['moderateState']) && is_array($in)) ? $in['moderateState'] : 
null))) ? ' 
flow-topic-moderatestate-'.htmlentities((string)((isset($in['moderateState']) 
&& is_array($in)) ? $in['moderateState'] : null), ENT_QUOTES, 'UTF-8').' ' : 
'').''.((LCRun3::ifvar($cx, ((isset($in['isModerated']) && is_array($in)) ? 
$in['isModerated'] : null))) ? ' flow-topic-moderated ' : 
'').''.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ? 
$in['isLocked'] : null))) ? 'flow-element-collapsible flow-element-collapsed' : 
'').'"
+'.$sp.'' : '').'';},'flow_topic' => function ($cx, $in, $sp) {return 
''.$sp.'<div class="flow-topic flow-load-interactive'.((LCRun3::ifvar($cx, 
((isset($in['moderateState']) && is_array($in)) ? $in['moderateState'] : 
null))) ? ' 
flow-topic-moderatestate-'.htmlentities((string)((isset($in['moderateState']) 
&& is_array($in)) ? $in['moderateState'] : null), ENT_QUOTES, 'UTF-8').' ' : 
'').''.((LCRun3::ifvar($cx, ((isset($in['isModerated']) && is_array($in)) ? 
$in['isModerated'] : null))) ? ' flow-topic-moderated ' : 
'').''.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ? 
$in['isLocked'] : null))) ? 'flow-element-collapsible flow-element-collapsed' : 
'').'"
 '.$sp.'     id="flow-topic-'.htmlentities((string)((isset($in['postId']) && 
is_array($in)) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
 '.$sp.'     data-flow-id="'.htmlentities((string)((isset($in['postId']) && 
is_array($in)) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
 '.$sp.'     data-flow-load-handler="topic"
diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index 9f2e90e..4505db8 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -196,7 +196,8 @@
 '.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()), 
'                ').'            <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-edit'),array()), 'encq').'</small>
 '.$sp.'        </div>
 '.$sp.'</form>
-';},'flow_reply_form' => function ($cx, $in, $sp) {return ''.$sp.'<form 
class="flow-post flow-reply-form"
+';},'flow_reply_form' => function ($cx, $in, $sp) {return 
''.$sp.''.((!LCRun3::ifvar($cx, ((isset($in['actions']['unlock']) && 
is_array($in['actions'])) ? $in['actions']['unlock'] : null))) ? '
+'.$sp.'<form class="flow-post flow-reply-form"
 '.$sp.'      method="POST"
 '.$sp.'      
action="'.htmlentities((string)((isset($in['actions']['reply']['url']) && 
is_array($in['actions']['reply'])) ? $in['actions']['reply']['url'] : null), 
ENT_QUOTES, 'UTF-8').'"
 '.$sp.'      id="flow-reply-'.htmlentities((string)((isset($in['postId']) && 
is_array($in)) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
@@ -226,7 +227,7 @@
 '.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()), 
'                ').'            <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-reply'),array()), 'encq').'</small>
 '.$sp.'        </div>
 '.$sp.'</form>
-';},'flow_post_replies' => function ($cx, $in, $sp) {return ''.$sp.'<div 
class="flow-replies">
+'.$sp.'' : '').'';},'flow_post_replies' => function ($cx, $in, $sp) {return 
''.$sp.'<div class="flow-replies">
 '.$sp.''.LCRun3::sec($cx, ((isset($in['replies']) && is_array($in)) ? 
$in['replies'] : null), $in, true, function($cx, $in)use($sp){return 
''.LCRun3::hbch($cx, 'eachPost', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']) && 
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['rootBlock'] : 
null),$in),array()), $in, false, function($cx, $in)use($sp){return '            
     <!-- eachPost nested replies -->
 '.$sp.'                        '.LCRun3::ch($cx, 'post', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']) && 
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['rootBlock'] : 
null),$in),array()), 'encq').'
 '.$sp.'';}).'';}).''.LCRun3::hbch($cx, 'ifCond', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']['submitted']['postId']) 
&& is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? 
$cx['sp_vars']['root']['rootBlock']['submitted']['postId'] : 
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] : 
null)),array()), $in, false, function($cx, $in)use($sp){return 
''.LCRun3::hbch($cx, 'ifCond', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']['submitted']['action']) 
&& is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? 
$cx['sp_vars']['root']['rootBlock']['submitted']['action'] : 
null),'===','reply'),array()), $in, false, function($cx, $in)use($sp){return 
''.LCRun3::p($cx, 'flow_reply_form', array(array($in),array()), '               
        ').'';}).'';}).'</div>
diff --git a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
index e3ea613..5520bd8 100644
--- a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
@@ -196,7 +196,8 @@
 '.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()), 
'                ').'            <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-edit'),array()), 'encq').'</small>
 '.$sp.'        </div>
 '.$sp.'</form>
-';},'flow_reply_form' => function ($cx, $in, $sp) {return ''.$sp.'<form 
class="flow-post flow-reply-form"
+';},'flow_reply_form' => function ($cx, $in, $sp) {return 
''.$sp.''.((!LCRun3::ifvar($cx, ((isset($in['actions']['unlock']) && 
is_array($in['actions'])) ? $in['actions']['unlock'] : null))) ? '
+'.$sp.'<form class="flow-post flow-reply-form"
 '.$sp.'      method="POST"
 '.$sp.'      
action="'.htmlentities((string)((isset($in['actions']['reply']['url']) && 
is_array($in['actions']['reply'])) ? $in['actions']['reply']['url'] : null), 
ENT_QUOTES, 'UTF-8').'"
 '.$sp.'      id="flow-reply-'.htmlentities((string)((isset($in['postId']) && 
is_array($in)) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
@@ -226,7 +227,7 @@
 '.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()), 
'                ').'            <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-reply'),array()), 'encq').'</small>
 '.$sp.'        </div>
 '.$sp.'</form>
-';},'flow_post_replies' => function ($cx, $in, $sp) {return ''.$sp.'<div 
class="flow-replies">
+'.$sp.'' : '').'';},'flow_post_replies' => function ($cx, $in, $sp) {return 
''.$sp.'<div class="flow-replies">
 '.$sp.''.LCRun3::sec($cx, ((isset($in['replies']) && is_array($in)) ? 
$in['replies'] : null), $in, true, function($cx, $in)use($sp){return 
''.LCRun3::hbch($cx, 'eachPost', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']) && 
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['rootBlock'] : 
null),$in),array()), $in, false, function($cx, $in)use($sp){return '            
     <!-- eachPost nested replies -->
 '.$sp.'                        '.LCRun3::ch($cx, 'post', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']) && 
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['rootBlock'] : 
null),$in),array()), 'encq').'
 '.$sp.'';}).'';}).''.LCRun3::hbch($cx, 'ifCond', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']['submitted']['postId']) 
&& is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? 
$cx['sp_vars']['root']['rootBlock']['submitted']['postId'] : 
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] : 
null)),array()), $in, false, function($cx, $in)use($sp){return 
''.LCRun3::hbch($cx, 'ifCond', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']['submitted']['action']) 
&& is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? 
$cx['sp_vars']['root']['rootBlock']['submitted']['action'] : 
null),'===','reply'),array()), $in, false, function($cx, $in)use($sp){return 
''.LCRun3::p($cx, 'flow_reply_form', array(array($in),array()), '               
        ').'';}).'';}).'</div>
diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php 
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index 86169c2..81462b4 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -191,7 +191,8 @@
 '.$sp.''.LCRun3::p($cx, 'flow_moderation_actions_list', 
array(array($in),array('moderationType'=>'topic','moderationTarget'=>'title','moderationTemplate'=>'topic','moderationContainerClass'=>'flow-menu','moderationMwUiClass'=>'mw-ui-button','moderationIcons'=>true)),
 '                  ').'            </ul>
 '.$sp.'        </div>
 '.$sp.'</div>
-';},'flow_reply_form' => function ($cx, $in, $sp) {return ''.$sp.'<form 
class="flow-post flow-reply-form"
+';},'flow_reply_form' => function ($cx, $in, $sp) {return 
''.$sp.''.((!LCRun3::ifvar($cx, ((isset($in['actions']['unlock']) && 
is_array($in['actions'])) ? $in['actions']['unlock'] : null))) ? '
+'.$sp.'<form class="flow-post flow-reply-form"
 '.$sp.'      method="POST"
 '.$sp.'      
action="'.htmlentities((string)((isset($in['actions']['reply']['url']) && 
is_array($in['actions']['reply'])) ? $in['actions']['reply']['url'] : null), 
ENT_QUOTES, 'UTF-8').'"
 '.$sp.'      id="flow-reply-'.htmlentities((string)((isset($in['postId']) && 
is_array($in)) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
@@ -221,7 +222,7 @@
 '.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()), 
'                ').'            <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-reply'),array()), 'encq').'</small>
 '.$sp.'        </div>
 '.$sp.'</form>
-';},'flow_topic' => function ($cx, $in, $sp) {return ''.$sp.'<div 
class="flow-topic flow-load-interactive'.((LCRun3::ifvar($cx, 
((isset($in['moderateState']) && is_array($in)) ? $in['moderateState'] : 
null))) ? ' 
flow-topic-moderatestate-'.htmlentities((string)((isset($in['moderateState']) 
&& is_array($in)) ? $in['moderateState'] : null), ENT_QUOTES, 'UTF-8').' ' : 
'').''.((LCRun3::ifvar($cx, ((isset($in['isModerated']) && is_array($in)) ? 
$in['isModerated'] : null))) ? ' flow-topic-moderated ' : 
'').''.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ? 
$in['isLocked'] : null))) ? 'flow-element-collapsible flow-element-collapsed' : 
'').'"
+'.$sp.'' : '').'';},'flow_topic' => function ($cx, $in, $sp) {return 
''.$sp.'<div class="flow-topic flow-load-interactive'.((LCRun3::ifvar($cx, 
((isset($in['moderateState']) && is_array($in)) ? $in['moderateState'] : 
null))) ? ' 
flow-topic-moderatestate-'.htmlentities((string)((isset($in['moderateState']) 
&& is_array($in)) ? $in['moderateState'] : null), ENT_QUOTES, 'UTF-8').' ' : 
'').''.((LCRun3::ifvar($cx, ((isset($in['isModerated']) && is_array($in)) ? 
$in['isModerated'] : null))) ? ' flow-topic-moderated ' : 
'').''.((LCRun3::ifvar($cx, ((isset($in['isLocked']) && is_array($in)) ? 
$in['isLocked'] : null))) ? 'flow-element-collapsible flow-element-collapsed' : 
'').'"
 '.$sp.'     id="flow-topic-'.htmlentities((string)((isset($in['postId']) && 
is_array($in)) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
 '.$sp.'     data-flow-id="'.htmlentities((string)((isset($in['postId']) && 
is_array($in)) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
 '.$sp.'     data-flow-load-handler="topic"
diff --git a/handlebars/compiled/flow_post.handlebars.php 
b/handlebars/compiled/flow_post.handlebars.php
index 1202ecb..f6e52c6 100644
--- a/handlebars/compiled/flow_post.handlebars.php
+++ b/handlebars/compiled/flow_post.handlebars.php
@@ -173,7 +173,8 @@
 '.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()), 
'                ').'            <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-edit'),array()), 'encq').'</small>
 '.$sp.'        </div>
 '.$sp.'</form>
-';},'flow_reply_form' => function ($cx, $in, $sp) {return ''.$sp.'<form 
class="flow-post flow-reply-form"
+';},'flow_reply_form' => function ($cx, $in, $sp) {return 
''.$sp.''.((!LCRun3::ifvar($cx, ((isset($in['actions']['unlock']) && 
is_array($in['actions'])) ? $in['actions']['unlock'] : null))) ? '
+'.$sp.'<form class="flow-post flow-reply-form"
 '.$sp.'      method="POST"
 '.$sp.'      
action="'.htmlentities((string)((isset($in['actions']['reply']['url']) && 
is_array($in['actions']['reply'])) ? $in['actions']['reply']['url'] : null), 
ENT_QUOTES, 'UTF-8').'"
 '.$sp.'      id="flow-reply-'.htmlentities((string)((isset($in['postId']) && 
is_array($in)) ? $in['postId'] : null), ENT_QUOTES, 'UTF-8').'"
@@ -203,7 +204,7 @@
 '.$sp.''.LCRun3::p($cx, 'flow_form_cancel_button', array(array($in),array()), 
'                ').'            <small class="flow-terms-of-use 
plainlinks">'.LCRun3::ch($cx, 'l10nParse', 
array(array('flow-terms-of-use-reply'),array()), 'encq').'</small>
 '.$sp.'        </div>
 '.$sp.'</form>
-';},'flow_post_replies' => function ($cx, $in, $sp) {return ''.$sp.'<div 
class="flow-replies">
+'.$sp.'' : '').'';},'flow_post_replies' => function ($cx, $in, $sp) {return 
''.$sp.'<div class="flow-replies">
 '.$sp.''.LCRun3::sec($cx, ((isset($in['replies']) && is_array($in)) ? 
$in['replies'] : null), $in, true, function($cx, $in)use($sp){return 
''.LCRun3::hbch($cx, 'eachPost', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']) && 
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['rootBlock'] : 
null),$in),array()), $in, false, function($cx, $in)use($sp){return '            
     <!-- eachPost nested replies -->
 '.$sp.'                        '.LCRun3::ch($cx, 'post', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']) && 
is_array($cx['sp_vars']['root'])) ? $cx['sp_vars']['root']['rootBlock'] : 
null),$in),array()), 'encq').'
 '.$sp.'';}).'';}).''.LCRun3::hbch($cx, 'ifCond', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']['submitted']['postId']) 
&& is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? 
$cx['sp_vars']['root']['rootBlock']['submitted']['postId'] : 
null),'===',((isset($in['postId']) && is_array($in)) ? $in['postId'] : 
null)),array()), $in, false, function($cx, $in)use($sp){return 
''.LCRun3::hbch($cx, 'ifCond', 
array(array(((isset($cx['sp_vars']['root']['rootBlock']['submitted']['action']) 
&& is_array($cx['sp_vars']['root']['rootBlock']['submitted'])) ? 
$cx['sp_vars']['root']['rootBlock']['submitted']['action'] : 
null),'===','reply'),array()), $in, false, function($cx, $in)use($sp){return 
''.LCRun3::p($cx, 'flow_reply_form', array(array($in),array()), '               
        ').'';}).'';}).'</div>
diff --git a/handlebars/flow_reply_form.partial.handlebars 
b/handlebars/flow_reply_form.partial.handlebars
index 1cf7974..f35d666 100644
--- a/handlebars/flow_reply_form.partial.handlebars
+++ b/handlebars/flow_reply_form.partial.handlebars
@@ -1,3 +1,4 @@
+{{#unless actions.unlock}}{{!-- HACK: T135848 --}}
 <form class="flow-post flow-reply-form"
       method="POST"
       action="{{actions.reply.url}}"
@@ -52,3 +53,4 @@
                <small class="flow-terms-of-use plainlinks">{{l10nParse 
"flow-terms-of-use-reply"}}</small>
        </div>
 </form>
+{{/unless}}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8331c5ae6727635a082ca964a243e567018dc459
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.28.0-wmf.4
Gerrit-Owner: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: Dereckson <dereck...@espace-win.org>
Gerrit-Reviewer: Mattflaschen <mflasc...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to