Merge branch 'groupspagination' into 1.0.x

This commit is contained in:
Evan Prodromou 2011-09-30 11:39:07 -04:00
commit 794dea4894
2 changed files with 5 additions and 1 deletions

View File

@ -350,6 +350,10 @@ class Profile extends Managed_DataObject
self::cacheSet($keypart, implode(',', $ids)); self::cacheSet($keypart, implode(',', $ids));
} }
if (!is_null($offset) && !is_null($limit)) {
$ids = array_slice($ids, $offset, $limit);
}
return User_group::multiGet('id', $ids); return User_group::multiGet('id', $ids);
} }

View File

@ -259,7 +259,7 @@ class ProfileAction extends Action
// TRANS: H2 text for user group membership statistics. // TRANS: H2 text for user group membership statistics.
$this->statsSectionLink('usergroups', _('Groups')); $this->statsSectionLink('usergroups', _('Groups'));
$this->text(' '); $this->text(' ');
$this->text($this->profile->getGroups()->N); $this->text($this->profile->getGroups(0, null)->N);
$this->elementEnd('h2'); $this->elementEnd('h2');
if ($groups) { if ($groups) {