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

Change subject: Remove RC spam for moderated topics
......................................................................


Remove RC spam for moderated topics

If a topic is hidden/deleted/suppressed, entries about the replies,
edits, ... whatnot inside that topic will no longer be displayed.

Bug: T116058
Change-Id: If695d4a0e9c5c44a1be9b207dac008a34af7dc99
---
M FlowActions.php
1 file changed, 8 insertions(+), 4 deletions(-)

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



diff --git a/FlowActions.php b/FlowActions.php
index 472037f..86d7174 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -706,7 +706,7 @@
 
                                /*
                                 * To check permissions, both the current 
revision (revision-
-                                * specific moderation state)& the last 
revision (global
+                                * specific moderation state) & the last 
revision (global
                                 * collection moderation state) will always be 
checked.
                                 * This one has special checks to make sure 
"restore" actions
                                 * are hidden when the user has no permissions 
to see the
@@ -762,10 +762,14 @@
                ),
                'root-permissions' => array(
                        PostRevision::MODERATED_NONE => '',
-                       PostRevision::MODERATED_HIDDEN => '',
                        PostRevision::MODERATED_LOCKED => '',
-                       PostRevision::MODERATED_DELETED => '',
-                       PostRevision::MODERATED_SUPPRESSED => 'flow-suppress',
+                       PostRevision::MODERATED_HIDDEN => '',
+                       // No data should be shown for other moderation levels: 
if a topic
+                       // has been deleted, we don't want a bunch of irrelevant
+                       // "new reply", "edit", ... spam in there.
+                       // All we want is the "topic has been deleted", which 
will still be
+                       // displayed (root-permissions won't be tested for the 
topic, since
+                       // it is the root)
                ),
                'core-delete-permissions' => array( 'deletedhistory' ),
                'history' => array(), // views don't generate history

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If695d4a0e9c5c44a1be9b207dac008a34af7dc99
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to