]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
correct groups from Profile::getGroups()
authorEvan Prodromou <evan@status.net>
Fri, 30 Sep 2011 15:38:06 +0000 (11:38 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 30 Sep 2011 15:38:06 +0000 (11:38 -0400)
classes/Profile.php
lib/profileaction.php

index 938c5357c24abc35691b44c805a53d979edae7cf..3b3e43025ba7189b0c1f3ce558bdd0cd0bc8d483 100644 (file)
@@ -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);
     }
 
index eaf515e04a45005e26e3d83c630125d608e9bf28..1bc14945576258416e4034dde7d608b037816d2a 100644 (file)
@@ -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) {