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
This commit is contained in:
Edward Chernenko
2025-01-07 03:28:08 +03:00
committed by jenkins-bot
parent c1d081fbb6
commit 6f95b63a0b

View File

@@ -124,7 +124,21 @@ class ContributionScores extends IncludableSpecialPage {
if ( $wgContribScoreIgnoreBlockedUsers ) { if ( $wgContribScoreIgnoreBlockedUsers ) {
$sqlWhere[] = "{$revUser} NOT IN " . $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 ) { if ( $wgContribScoreIgnoreBots ) {