jenkins-bot has submitted this change and it was merged.
Change subject: Bug 43492 - Add AbuseFilter-feature to auto-resolve feedback
......................................................................
Bug 43492 - Add AbuseFilter-feature to auto-resolve feedback
Change-Id: I308bed06326a93d3eaadfc9567520fca97cb381f
---
M ArticleFeedbackv5.i18n.php
M ArticleFeedbackv5.php
M ArticleFeedbackv5.utils.php
M api/ApiArticleFeedbackv5.php
4 files changed, 9 insertions(+), 0 deletions(-)
Approvals:
Matthias Mullie: Looks good to me, approved
jenkins-bot: Verified
diff --git a/ArticleFeedbackv5.i18n.php b/ArticleFeedbackv5.i18n.php
index 90c8789..f44d4fb 100644
--- a/ArticleFeedbackv5.i18n.php
+++ b/ArticleFeedbackv5.i18n.php
@@ -707,6 +707,8 @@
'articlefeedbackv5-disable-flyover-prefbutton' => 'Go to my
preferences',
/* Custom AbuseFilter actions */
+ 'abusefilter-edit-action-aftv5resolve' => '(Article Feedback)
Auto-resolve',
+ 'articlefeedbackv5-abusefilter-note-aftv5resolve' => 'Automatically
resolved. Rule: $1',
'abusefilter-edit-action-aftv5flagabuse' => '(Article Feedback)
Auto-flag as abuse',
'articlefeedbackv5-abusefilter-note-aftv5flagabuse' => 'Automatically
flagged as abuse. Rule: $1',
'abusefilter-edit-action-aftv5hide' => '(Article Feedback) Auto-hide',
@@ -2105,6 +2107,8 @@
It must be: {{msg-mw|mypreferences}} > {{msg-mw|prefs-rendering}}',
'articlefeedbackv5-disable-flyover-prefbutton' => 'The text of the big
glossy button used to send the user to their preferences in the tooltip that
pops up when you click the close button on a feedback trigger link, explaining
how to remove the Article Feedback tool',
+ 'abusefilter-edit-action-aftv5resolve' => 'The text for the checkbox
used by Special:AbuseFilter to indicate that a rule should result in the
feedback being auto-resolved',
+ 'articlefeedbackv5-abusefilter-note-aftv5resolve' => 'The note to add
to the activity log when auto-resolving a new feedback post (<code>$1</code> is
the name of the filter)',
'abusefilter-edit-action-aftv5flagabuse' => 'The text for the checkbox
used by Special:AbuseFilter to indicate that a rule should result in the
feedback being auto-flagged as abuse',
'articlefeedbackv5-abusefilter-note-aftv5flagabuse' => 'The note to add
to the activity log when auto-flagging a new feedback post as abuse
(<code>$1</code> is the name of the filter)',
'abusefilter-edit-action-aftv5hide' => 'The text for the checkbox used
by Special:AbuseFilter to indicate that a rule should result in the feedback
being auto-hidden',
diff --git a/ArticleFeedbackv5.php b/ArticleFeedbackv5.php
index 0cae785..6535c6a 100644
--- a/ArticleFeedbackv5.php
+++ b/ArticleFeedbackv5.php
@@ -478,6 +478,7 @@
}
// Add custom action handlers for AbuseFilter
+$wgAbuseFilterAvailableActions[] = 'aftv5resolve';
$wgAbuseFilterAvailableActions[] = 'aftv5flagabuse';
$wgAbuseFilterAvailableActions[] = 'aftv5hide';
$wgAbuseFilterAvailableActions[] = 'aftv5request';
diff --git a/ArticleFeedbackv5.utils.php b/ArticleFeedbackv5.utils.php
index fb42a8f..706d447 100644
--- a/ArticleFeedbackv5.utils.php
+++ b/ArticleFeedbackv5.utils.php
@@ -331,6 +331,7 @@
if ( $callback && is_callable( $callback ) ) {
global $wgAbuseFilterCustomActionsHandlers;
+
$wgAbuseFilterCustomActionsHandlers['aftv5resolve'] = $callback;
$wgAbuseFilterCustomActionsHandlers['aftv5flagabuse'] = $callback;
$wgAbuseFilterCustomActionsHandlers['aftv5hide'] = $callback;
$wgAbuseFilterCustomActionsHandlers['aftv5request'] = $callback;
diff --git a/api/ApiArticleFeedbackv5.php b/api/ApiArticleFeedbackv5.php
index 6350904..d8b0b51 100644
--- a/api/ApiArticleFeedbackv5.php
+++ b/api/ApiArticleFeedbackv5.php
@@ -203,6 +203,9 @@
*/
public function callbackAbuseActionFlag( $action, $parameters, $title,
$vars, $rule_desc ) {
switch ( $action ) {
+ case 'aftv5resolve':
+ $this->autoFlag['resolve'] = $rule_desc;
+ break;
case 'aftv5flagabuse':
$this->autoFlag['flagabuse'] = $rule_desc;
break;
--
To view, visit https://gerrit.wikimedia.org/r/48631
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I308bed06326a93d3eaadfc9567520fca97cb381f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: Se4598 <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits