Page MenuHomePhabricator

Change the priority order for hidden abuselog entries
Closed, ResolvedPublic


In, 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

Change 453779 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Change priority order for messages in hidden abuselog entries

Huji removed a project: Patch-For-Review.

Change 453779 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Change priority order for messages in hidden abuselog entries