From 45e6fa932d7f37ecf0465c84dbfe3ffcf6c26bcb Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 30 Sep 2018 14:08:06 +0200 Subject: [PATCH] Fix caller name in AbuseFilterHooks::fetchAllTags Seeing {closure} in the logs as caller is not helpful Change-Id: Id3bf5c7fd810d48dc04a167692b336b3ccba2eb4 --- includes/AbuseFilterHooks.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/AbuseFilterHooks.php b/includes/AbuseFilterHooks.php index 38920c54a..1ef7ac817 100644 --- a/includes/AbuseFilterHooks.php +++ b/includes/AbuseFilterHooks.php @@ -414,6 +414,7 @@ class AbuseFilterHooks { private static function fetchAllTags( array &$tags, $enabled ) { $services = MediaWikiServices::getInstance(); $cache = $services->getMainWANObjectCache(); + $fname = __METHOD__; $tags = $cache->getWithSetCallback( // Key to store the cached value under @@ -423,7 +424,7 @@ class AbuseFilterHooks { $cache::TTL_MINUTE, // Function that derives the new key value - function ( $oldValue, &$ttl, array &$setOpts ) use ( $enabled, $tags ) { + function ( $oldValue, &$ttl, array &$setOpts ) use ( $enabled, $tags, $fname ) { global $wgAbuseFilterCentralDB, $wgAbuseFilterIsCentral; $dbr = wfGetDB( DB_REPLICA ); @@ -440,7 +441,7 @@ class AbuseFilterHooks { [ 'abuse_filter_action', 'abuse_filter' ], 'afa_parameters', $where, - __METHOD__, + $fname, [], [ 'abuse_filter' => [ 'INNER JOIN', 'afa_filter=af_id' ] ] ); @@ -458,7 +459,7 @@ class AbuseFilterHooks { [ 'abuse_filter_action', 'abuse_filter' ], 'afa_parameters', $where, - __METHOD__, + $fname, [], [ 'abuse_filter' => [ 'INNER JOIN', 'afa_filter=af_id' ] ] );