mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Remove and replace an argument in AbuseFilter::addLogEntries
Change-Id: Ib4613577d1b5ac5a5cc796716c95b99196259438
This commit is contained in:
parent
8adffed8af
commit
df346b3995
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue