From: This, that and the other Date: Thu, 2 Feb 2017 00:15:38 +0000 (+1100) Subject: Make last remaining user_groups queries honor $wgDisableUserGroupExpiry X-Git-Tag: 1.31.0-rc.0~4162^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=84129bbb44e99601f27ae85acb6424e2106e5b04;p=lhc%2Fweb%2Fwiklou.git Make last remaining user_groups queries honor $wgDisableUserGroupExpiry Follow-up to I94102ceb00398940965280d8742a2747631dcc87 Change-Id: I62952c42b2f6ee1bed0088e17826e19dfc23471c --- diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 21db3ca20e..136f60ecce 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -167,7 +167,7 @@ class ApiQueryAllUsers extends ApiQueryBase { 'ug_user=user_id', $this->getConfig()->get( 'DisableUserGroupExpiry' ) ? '1' : - 'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) + 'ug_expiry IS NULL OR ug_expiry >= ' . $db->addQuotes( $db->timestamp() ) ] ) ] ); } diff --git a/includes/specials/pagers/ActiveUsersPager.php b/includes/specials/pagers/ActiveUsersPager.php index 1fec05d39d..0d6f493d59 100644 --- a/includes/specials/pagers/ActiveUsersPager.php +++ b/includes/specials/pagers/ActiveUsersPager.php @@ -111,7 +111,9 @@ class ActiveUsersPager extends UsersPager { 'user_groups', '1', [ 'ug_user = user_id', 'ug_group' => $group, - 'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() ) + $this->getConfig()->get( 'DisableUserGroupExpiry' ) ? + '1' : + 'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() ) ] ) . ')'; }