mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Avoid sending stashing statsd data for bots in AbuseFilter::filterAction
Change-Id: Ic06f64c22fc94665e58620a98e17264d48c97deb
This commit is contained in:
parent
5ee6ec86b7
commit
bc04dd93fe
|
@ -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