X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllUsers.php;h=9e7ad67068ec9460a2b3347872f63e12ba5101b0;hb=49748181dd56ec97e7ba7c13e684a16abceb3cc0;hp=1c3b171fd4ecb4abfa85f64144af8f009bcab8a3;hpb=0eae584888d0e4f0a40896c56c4ec92bd3200176;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 1c3b171fd4..9e7ad67068 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -147,7 +147,9 @@ class ApiQueryAllUsers extends ApiQueryBase { $this->addJoinConds( [ 'ug1' => [ 'LEFT OUTER JOIN', array_merge( [ 'ug1.ug_user=user_id', - 'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) + $this->getConfig()->get( 'DisableUserGroupExpiry' ) ? + '1' : + 'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) ], $exclude ) ] ] ); $this->addWhere( 'ug1.ug_user IS NULL' ); @@ -163,7 +165,9 @@ class ApiQueryAllUsers extends ApiQueryBase { $this->addFields( [ 'groups' => $db->buildGroupConcatField( '|', 'user_groups', 'ug_group', [ 'ug_user=user_id', - 'ug_expiry IS NULL OR ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) + $this->getConfig()->get( 'DisableUserGroupExpiry' ) ? + '1' : + 'ug_expiry IS NULL OR ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) ] ) ] ); } @@ -182,7 +186,7 @@ class ApiQueryAllUsers extends ApiQueryBase { ], ] ] ); - // Actually count the actions using a subquery (bug 64505 and bug 64507) + // Actually count the actions using a subquery (T66505 and T66507) $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $activeUserSeconds ); $this->addFields( [ 'recentactions' => '(' . $db->selectSQLText(