X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialActiveusers.php;h=0caf6b4a6f4510043581b0bcef29e2ada0651fc6;hb=52328f043c3f3e9a0ce76a8eadb7975bc957846e;hp=fe063758221ba261e0a79048d3f1ac029b750a8f;hpb=8181f97897e2ce419d4e8599240af46d33b5ea63;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index fe06375822..0caf6b4a6f 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -115,15 +115,23 @@ class ActiveUsersPager extends UsersPager { ) . ')'; } + if ( $dbr->implicitGroupby() ) { + $options = array( 'GROUP BY' => array( 'qcc_title' ) ); + } else { + $options = array( 'GROUP BY' => array( 'user_name', 'user_id', 'qcc_title' ) ); + } + return array( 'tables' => array( 'querycachetwo', 'user', 'recentchanges' ), 'fields' => array( 'user_name', 'user_id', 'recentedits' => 'COUNT(*)', 'qcc_title' ), - 'options' => array( 'GROUP BY' => array( 'qcc_title' ) ), + 'options' => $options, 'conds' => $conds ); } function doBatchLookups() { + parent::doBatchLookups(); + $uids = array(); foreach ( $this->mResult as $row ) { $uids[] = $row->user_id; @@ -172,7 +180,8 @@ class ActiveUsersPager extends UsersPager { // Note: This is a different loop than for user rights, // because we're reusing it to build the group links // at the same time - foreach ( $user->getGroups() as $group ) { + $groups_list = self::getGroups( intval( $row->user_id ), $this->userGroupCache ); + foreach ( $groups_list as $group ) { if ( in_array( $group, $this->hideGroups ) ) { return ''; }