Remove and replace an argument in AbuseFilter::addLogEntries

Change-Id: Ib4613577d1b5ac5a5cc796716c95b99196259438
This commit is contained in:
Matěj Suchánek 2018-07-12 09:26:20 +02:00
parent 8adffed8af
commit df346b3995

View file

@ -1146,6 +1146,7 @@ class AbuseFilter {
'afl_timestamp' => wfGetDB( DB_REPLICA )->timestamp( wfTimestampNow() ),
'afl_namespace' => $title->getNamespace(),
'afl_title' => $title->getDBkey(),
'afl_action' => $action,
// DB field is not null, so nothing
'afl_ip' => ( $wgAbuseFilterLogIP ) ? $wgRequest->getIP() : ""
];
@ -1155,7 +1156,7 @@ class AbuseFilter {
$log_template['afl_user_text'] = $vars->getVar( 'accountname' )->toString();
}
self::addLogEntries( $actions_taken, $log_template, $action, $vars, $group );
self::addLogEntries( $actions_taken, $log_template, $vars, $group );
}
return $status;
@ -1236,13 +1237,10 @@ class AbuseFilter {
/**
* @param array[] $actions_taken
* @param array $log_template
* @param string $action
* @param AbuseFilterVariableHolder $vars
* @param string $group The filter's group (as defined in $wgAbuseFilterValidGroups)
*/
public static function addLogEntries( $actions_taken, $log_template, $action,
$vars, $group = 'default'
) {
public static function addLogEntries( $actions_taken, $log_template, $vars, $group = 'default' ) {
$dbw = wfGetDB( DB_MASTER );
$central_log_template = [
@ -1258,7 +1256,6 @@ class AbuseFilter {
$globalIndex = self::decodeGlobalName( $filter );
$thisLog = $log_template;
$thisLog['afl_filter'] = $filter;
$thisLog['afl_action'] = $action;
$thisLog['afl_actions'] = implode( ',', $actions );
// Don't log if we were only throttling.