From: Evan Prodromou Date: Fri, 30 Sep 2011 15:38:06 +0000 (-0400) Subject: correct groups from Profile::getGroups() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cd3bc8f4ef068636a8f169b357cf012f6e99f291;p=quix0rs-gnu-social.git correct groups from Profile::getGroups() --- diff --git a/classes/Profile.php b/classes/Profile.php index 938c5357c2..3b3e43025b 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -350,6 +350,10 @@ class Profile extends Managed_DataObject self::cacheSet($keypart, implode(',', $ids)); } + if (!is_null($offset) && !is_null($limit)) { + $ids = array_slice($ids, $offset, $limit); + } + return User_group::multiGet('id', $ids); } diff --git a/lib/profileaction.php b/lib/profileaction.php index eaf515e04a..1bc1494557 100644 --- a/lib/profileaction.php +++ b/lib/profileaction.php @@ -259,7 +259,7 @@ class ProfileAction extends Action // TRANS: H2 text for user group membership statistics. $this->statsSectionLink('usergroups', _('Groups')); $this->text(' '); - $this->text($this->profile->getGroups()->N); + $this->text($this->profile->getGroups(0, null)->N); $this->elementEnd('h2'); if ($groups) {