From 384fdfa2bf638454e74867c567ed01c1e59ba089 Mon Sep 17 00:00:00 2001 From: 0d0 <0d0acre@esiliati.org> Date: Thu, 23 Jan 2025 20:21:52 +0100 Subject: [PATCH] Patch ContributionScores for newer tables --- src/ContributionScores.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/ContributionScores.php b/src/ContributionScores.php index 6d5683f..1c618b1 100644 --- a/src/ContributionScores.php +++ b/src/ContributionScores.php @@ -121,7 +121,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 ) { @@ -187,7 +201,6 @@ class ContributionScores extends IncludableSpecialPage { __METHOD__, [ 'ORDER BY' => 'wiki_rank DESC', - 'GROUP BY' => 'user_name', 'LIMIT' => $limit, ], [