mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
Change priority order for messages in hidden abuselog entries
Check if the entry is deleted first, since it's the strongest deletion here (oversight level). Bonus: don't use implicit conversion when checking the return value of SpecialAbuseLog::isHidden. Bug: T200644 Change-Id: Ie5c4575ad29fe3dcb85a26cc74f1c59207df2852
This commit is contained in:
parent
01df24418a
commit
9d21c7d03d
|
@ -157,7 +157,8 @@ class AbuseFilterViewExamine extends AbuseFilterView {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( SpecialAbuseLog::isHidden( $row ) && !$this->getUser()->isAllowed( 'deletedtext' ) ) {
|
||||
if ( SpecialAbuseLog::isHidden( $row ) === 'implicit' &&
|
||||
!$this->getUser()->isAllowed( 'deletedtext' ) ) {
|
||||
$out->addWikiMsg( 'abusefilter-log-details-hidden-implicit' );
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1055,6 +1055,11 @@ class SpecialAbuseLog extends SpecialPage {
|
|||
* The string 'implicit' if it is hidden because the corresponding revision is hidden.
|
||||
*/
|
||||
public static function isHidden( $row ) {
|
||||
// First, check if the entry is hidden. Since this is an oversight-level deletion,
|
||||
// it's more important than the associated revision being deleted.
|
||||
if ( $row->afl_deleted ) {
|
||||
return true;
|
||||
}
|
||||
if ( $row->afl_rev_id ) {
|
||||
$revision = Revision::newFromId( $row->afl_rev_id );
|
||||
if ( $revision && $revision->getVisibility() != 0 ) {
|
||||
|
@ -1062,7 +1067,7 @@ class SpecialAbuseLog extends SpecialPage {
|
|||
}
|
||||
}
|
||||
|
||||
return (bool)$row->afl_deleted;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue