Merge "Partly unbreak throttle action"

This commit is contained in:
jenkins-bot 2018-09-09 12:03:40 +00:00 committed by Gerrit Code Review
commit dee934cd5a

View file

@ -2396,6 +2396,12 @@ class AbuseFilter {
if ( $enabled ) {
$parameters = $actions[$action]['parameters'];
if ( $action === 'throttle' && $parameters[0] === 'new' ) {
// FIXME: Do we really need to keep the filter ID inside throttle parameters?
// We'd save space, keep things simpler and avoid this hack. Note: if removing
// it, a maintenance script will be necessary to clean up the table.
$parameters[0] = $new_id;
}
$thisRow = [
'afa_filter' => $new_id,