From 6e2d7931a5f8c1de78faeb41e3e8b83db1f7757a Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 7 Jun 2020 01:54:41 +0200 Subject: [PATCH] Pass function name to database functions Useful for logging Change-Id: Ib6b3ad814dd24d31aab37be486ff32d3f57c7905 --- includes/AbuseFilterHooks.php | 2 +- includes/AbuseFilterRunner.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/AbuseFilterHooks.php b/includes/AbuseFilterHooks.php index 4464eea80..8e03e8c7a 100644 --- a/includes/AbuseFilterHooks.php +++ b/includes/AbuseFilterHooks.php @@ -838,7 +838,7 @@ class AbuseFilterHooks { */ public static function onUnitTestsAfterDatabaseSetup( IMaintainableDatabase $db, $prefix ) { $externalPrefix = AbuseFilterConsequencesTest::DB_EXTERNAL_PREFIX; - if ( $db->tableExists( $externalPrefix . AbuseFilterConsequencesTest::$externalTables[0] ) ) { + if ( $db->tableExists( $externalPrefix . AbuseFilterConsequencesTest::$externalTables[0], __METHOD__ ) ) { // Check a random table to avoid unnecessary table creations. See T155147. return; } diff --git a/includes/AbuseFilterRunner.php b/includes/AbuseFilterRunner.php index 5ba345164..4fdf9511c 100644 --- a/includes/AbuseFilterRunner.php +++ b/includes/AbuseFilterRunner.php @@ -1285,7 +1285,8 @@ class AbuseFilterRunner { [ 'af_id' => $loggedLocalFilters ], $method ); - } + }, + $method ); } @@ -1314,7 +1315,8 @@ class AbuseFilterRunner { [ 'af_id' => $loggedGlobalFilters ], $method ); - } + }, + $method ); }