mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-09-24 10:48:17 +00:00
Merge "Avoid sending stashing statsd data for bots in AbuseFilter::filterAction"
This commit is contained in:
commit
cf491b18f7
|
@ -1152,7 +1152,10 @@ class AbuseFilter {
|
|||
global $wgAbuseFilterLogIP;
|
||||
|
||||
$logger = LoggerFactory::getInstance( 'StashEdit' );
|
||||
$statsd = MediaWikiServices::getInstance()->getStatsdDataFactory();
|
||||
// Bots do not use edit stashing, so avoid distorting the stats
|
||||
$statsd = $user->isBot()
|
||||
? new NullStatsdDataFactory()
|
||||
: MediaWikiServices::getInstance()->getStatsdDataFactory();
|
||||
|
||||
// Add vars from extensions
|
||||
Hooks::run( 'AbuseFilter-filterAction', [ &$vars, $title ] );
|
||||
|
|
Loading…
Reference in a new issue