⚓ T200644 Change the priority order for hidden abuselog entries


Article Images

Change the priority order for hidden abuselog entries

In https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/445727/, revdeled revisions were made visible from abuselog if the user has the required rights. This way, going to abuselog:

  1. If an abuselog entry was suppressed, it shows the message "entry hidden"
  2. If the revision associated with the abuselog entry was revdeled, then it shows the message "hidden because revision has been deleted"

This is correct, and the patch seems to work, but there's a tiny improvement we can do. If both 1. and 2. are true for the same revision (revdeled and abuselog suppressed), the message shown is again "hidden because revision has been deleted". Since a suppressed entry is a stronger degree of deletion, I guess in this case we should show "entry hidden" instead.
You can check for instance on beta cluster, the second entry is both revdeled and suppressed.
I can't send a patch myself, but will provide a quick overview of the situation: the logic for generating the message is here. What we should do is rewrite the isHidden function so that if the entry is suppressed it returns true without checking the visibility of the revision.

Also, if someone wants to make a patch, could they please change the use of isHidden in this line to read

SpecialAbuseLog::isHidden( $row ) === 'implicit'

thus adding an explicit comparison? The result is identical since we already checked for suppressed entries before, but this way it'd be clearer what we're doing.

Event Timeline

Huji closed this task as Resolved.Aug 19 2018, 7:02 PM

Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits