Merge "Add batch lookup for user groups and titles on Special:ActiveUsers"

This commit is contained in:
jenkins-bot 2015-01-05 19:46:21 +00:00 committed by Gerrit Code Review
commit e3054687a9
2 changed files with 5 additions and 2 deletions

View file

@ -124,6 +124,8 @@ class ActiveUsersPager extends UsersPager {
}
function doBatchLookups() {
parent::doBatchLookups();
$uids = array();
foreach ( $this->mResult as $row ) {
$uids[] = $row->user_id;
@ -172,7 +174,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 '';
}

View file

@ -37,7 +37,7 @@ class UsersPager extends AlphabeticPager {
/**
* @var array A array with user ids as key and a array of groups as value
*/
private $userGroupCache;
protected $userGroupCache;
/**
* @param IContextSource $context