always show diff link if available

This patch makes a diff link appear in Special:Abuselog no matter a filter
is public or private. Because there is much information to figure out which
revision a filter catches, showing a diff link will make patrollers more
convenient without leaking more information.

Bug: 59695
Change-Id: I6a4432cbb41ae78583cc87355514f252984c1005
This commit is contained in:
nullzero 2014-01-05 22:53:05 -05:00 committed by Sorawee Porncharoenwase
parent 91ff9853ce
commit ecaa6dcb0d
2 changed files with 19 additions and 2 deletions

View file

@ -88,6 +88,9 @@ Rule description: $1',
'abusefilter-log-entry' => '$1: $2 triggered an abuse filter, performing the action "$3" on $4.
Actions taken: $5;
Filter description: $6',
'abusefilter-log-entry-withdiff' => '$1: $2 triggered an abuse filter, performing the action "$3" on $4.
Actions taken: $5;
Filter description: $6 ($7)',
'abusefilter-log-detailedentry-meta' => '$1: $2 triggered $3, performing the action "$4" on $5.
Actions taken: $6;
Filter description: $7 ($8)',
@ -594,6 +597,14 @@ $messages['qqq'] = array(
* $4 link to page the action that triggered the filter was made on
* $5 actions taken by the filter
* $6 comments in filter description.',
'abusefilter-log-entry-withdiff' => 'This message is for a log entry. Parameters:
* $1 timestamp
* $2 user
* $3 action by user
* $4 link to page the action that triggered the filter was made on
* $5 actions taken by the filter
* $6 comments in filter description
* $7 link to diff.',
'abusefilter-log-detailedentry-meta' => 'This message is for a log entry. Parameters:
* $1 - timestamp
* $2 - user

View file

@ -530,13 +530,19 @@ class SpecialAbuseLog extends SpecialPage {
$row->afl_user_text
)->parse();
} else {
$description = $this->msg( 'abusefilter-log-entry' )->rawParams(
if ( $diffLink ) {
$msg = 'abusefilter-log-entry-withdiff';
} else {
$msg = 'abusefilter-log-entry';
}
$description = $this->msg( $msg )->rawParams(
$timestamp,
$userLink,
$row->afl_action,
$pageLink,
$actions_taken,
$parsed_comments
$parsed_comments,
$diffLink // Passing $7 to 'abusefilter-log-entry' will do nothing, as it's not used.
)->parse();
}