From: Roan Kattouw Date: Sun, 3 Jan 2010 20:16:25 +0000 (+0000) Subject: Followup to r60587: wrong user_groups join X-Git-Tag: 1.31.0-rc.0~38425 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=0dc85a3658bc9dab912c33966f301c7c52446d0d;p=lhc%2Fweb%2Fwiklou.git Followup to r60587: wrong user_groups join --- diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index ba7dd1fb01..a499e9015c 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -65,6 +65,7 @@ class ApiQueryAllUsers extends ApiQueryBase { $this->addWhere('u1.user_name' . $db->buildLike($this->keyToTitle($params['prefix']), $db->anyString())); if (!is_null($params['group'])) { + $useIndex = false; // Filter only users that belong to a given group $this->addTables('user_groups', 'ug1'); $ug1 = $this->getAliasedName('user_groups', 'ug1'); @@ -76,7 +77,6 @@ class ApiQueryAllUsers extends ApiQueryBase { $this->addWhere('user_editcount > 0'); if ($fld_groups) { - $useIndex = false; // Show the groups the given users belong to // request more than needed to avoid not getting all rows that belong to one user $groupCount = count(User::getAllGroups());