Update ContributionScores for expiring user groups

Bug: T160020
Change-Id: I66c9108133d2bdd5dc29336a525480764c95f5c2
This commit is contained in:
Func 2021-03-14 03:29:49 +00:00
parent 6fac0091ec
commit 4dc3f4fc3e

View file

@ -121,8 +121,10 @@ class ContributionScores extends IncludableSpecialPage {
if ( $wgContribScoreIgnoreBots ) { if ( $wgContribScoreIgnoreBots ) {
$sqlWhere[] = "{$revUser} NOT IN " . $sqlWhere[] = "{$revUser} NOT IN " .
$dbr->buildSelectSubquery( 'user_groups', 'ug_user', [ 'ug_group' => 'bot' ], __METHOD__ ); $dbr->buildSelectSubquery( 'user_groups', 'ug_user', [
'ug_group' => 'bot',
'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() )
], __METHOD__ );
} }
if ( $dbr->unionSupportsOrderAndLimit() ) { if ( $dbr->unionSupportsOrderAndLimit() ) {