]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
proper pagination for subs and members
authorEvan Prodromou <git@evanprodromou.name>
Thu, 29 Jan 2009 13:37:40 +0000 (08:37 -0500)
committerEvan Prodromou <git@evanprodromou.name>
Thu, 29 Jan 2009 13:37:40 +0000 (08:37 -0500)
actions/groupmembers.php
actions/subscribers.php
actions/subscriptions.php

index 53395c418de30ba9cb95d7c9d2e9c39104fdef6d..00f43a9f55e89c2e80d4a538e2fa3c62d45a6e8f 100644 (file)
@@ -122,11 +122,13 @@ class GroupmembersAction extends Action
         $offset = ($this->page-1) * PROFILES_PER_PAGE;
         $limit =  PROFILES_PER_PAGE + 1;
 
+        $cnt = 0;
+
         $members = $this->group->getMembers($offset, $limit);
 
         if ($members) {
             $member_list = new ProfileList($members, null, $this);
-            $member_list->show();
+            $cnt = $member_list->show();
         }
 
         $members->free();
index 25200079c4b8ede04eb03213bd5d9687b321d83a..22faafaef945293dbd0279b57f6ff87424028538 100644 (file)
@@ -72,9 +72,13 @@ class SubscribersAction extends GalleryAction
 
     function showContent()
     {
+        parent::showContent();
+
         $offset = ($this->page-1) * PROFILES_PER_PAGE;
         $limit =  PROFILES_PER_PAGE + 1;
 
+        $cnt = 0;
+
         if ($this->tag) {
             $subscribers = $this->user->getTaggedSubscribers($this->tag, $offset, $limit);
         } else {
@@ -83,7 +87,7 @@ class SubscribersAction extends GalleryAction
 
         if ($subscribers) {
             $subscribers_list = new SubscribersList($subscribers, $this->user, $this);
-            $subscribers_list->show();
+            $cnt = $subscribers_list->show();
         }
 
         $subscribers->free();
index d7ba0d624b34e32bfae1967a9b402ff79a32d298..3fbea2039d29ec3250acf1b20a2471d99b4288d1 100644 (file)
@@ -84,6 +84,8 @@ class SubscriptionsAction extends GalleryAction
         $offset = ($this->page-1) * PROFILES_PER_PAGE;
         $limit =  PROFILES_PER_PAGE + 1;
 
+        $cnt = 0;
+
         if ($this->tag) {
             $subscriptions = $this->user->getTaggedSubscriptions($this->tag, $offset, $limit);
         } else {
@@ -92,7 +94,7 @@ class SubscriptionsAction extends GalleryAction
 
         if ($subscriptions) {
             $subscriptions_list = new SubscriptionsList($subscriptions, $this->user, $this);
-            $subscriptions_list->show();
+            $cnt = $subscriptions_list->show();
         }
 
         $subscriptions->free();