Patch ContributionScores for newer tables

This commit is contained in:
0d0 2025-01-23 20:21:52 +01:00
parent 7f40072416
commit 384fdfa2bf

View file

@ -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,
],
[