jenkins-bot has submitted this change and it was merged.
Change subject: always show diff link if available
......................................................................
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
---
M AbuseFilter.i18n.php
M special/SpecialAbuseLog.php
2 files changed, 19 insertions(+), 2 deletions(-)
Approvals:
Jackmcbarn: Looks good to me, but someone else must approve
Siebrand: Looks good to me, approved
jenkins-bot: Verified
diff --git a/AbuseFilter.i18n.php b/AbuseFilter.i18n.php
index 592f406..6132d36 100644
--- a/AbuseFilter.i18n.php
+++ b/AbuseFilter.i18n.php
@@ -88,6 +88,9 @@
'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 @@
* $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
diff --git a/special/SpecialAbuseLog.php b/special/SpecialAbuseLog.php
index 96437c7..063460f 100644
--- a/special/SpecialAbuseLog.php
+++ b/special/SpecialAbuseLog.php
@@ -530,13 +530,19 @@
$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();
}
--
To view, visit https://gerrit.wikimedia.org/r/105637
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6a4432cbb41ae78583cc87355514f252984c1005
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Nullzero <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Werdna <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits