From 6f95b63a0bedfcfeb349d87b9943d873232c9bd2 Mon Sep 17 00:00:00 2001 From: Edward Chernenko Date: Tue, 7 Jan 2025 03:28:08 +0300 Subject: [PATCH] Update for MediaWiki 1.43 1) replaced use of "ipblocks" table (removed from MediaWiki core). 2) removed unnecessary GROUP BY (user_name is already unique), which was causing errors in MySQL strict mode. Bug: T379715 Bug: T309096 Change-Id: Ib3e9dd01a52466aa19b20e1f7fbfe9bb0f5dd02f --- src/ContributionScores.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/ContributionScores.php b/src/ContributionScores.php index 65c886b..9540b4f 100644 --- a/src/ContributionScores.php +++ b/src/ContributionScores.php @@ -124,7 +124,21 @@ class ContributionScores extends IncludableSpecialPage { if ( $wgContribScoreIgnoreBlockedUsers ) { $sqlWhere[] = "{$revUser} NOT IN " . - $dbr->buildSelectSubquery( 'ipblocks', 'ipb_user', 'ipb_user <> 0', __METHOD__ ); + $dbr->buildSelectSubquery( + [ + 'block', + 'block_target' + ], + 'bt_user', + 'bt_user <> 0', + __METHOD__, + [], + [ + 'block_target' => [ 'JOIN', [ + 'bl_target=bt_id' + ] ] + ] + ); } if ( $wgContribScoreIgnoreBots ) {