proper pagination for subs and members
This commit is contained in:
parent
04b3add162
commit
b6fbb9462c
@ -122,11 +122,13 @@ class GroupmembersAction extends Action
|
|||||||
$offset = ($this->page-1) * PROFILES_PER_PAGE;
|
$offset = ($this->page-1) * PROFILES_PER_PAGE;
|
||||||
$limit = PROFILES_PER_PAGE + 1;
|
$limit = PROFILES_PER_PAGE + 1;
|
||||||
|
|
||||||
|
$cnt = 0;
|
||||||
|
|
||||||
$members = $this->group->getMembers($offset, $limit);
|
$members = $this->group->getMembers($offset, $limit);
|
||||||
|
|
||||||
if ($members) {
|
if ($members) {
|
||||||
$member_list = new ProfileList($members, null, $this);
|
$member_list = new ProfileList($members, null, $this);
|
||||||
$member_list->show();
|
$cnt = $member_list->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
$members->free();
|
$members->free();
|
||||||
|
@ -72,9 +72,13 @@ class SubscribersAction extends GalleryAction
|
|||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
|
parent::showContent();
|
||||||
|
|
||||||
$offset = ($this->page-1) * PROFILES_PER_PAGE;
|
$offset = ($this->page-1) * PROFILES_PER_PAGE;
|
||||||
$limit = PROFILES_PER_PAGE + 1;
|
$limit = PROFILES_PER_PAGE + 1;
|
||||||
|
|
||||||
|
$cnt = 0;
|
||||||
|
|
||||||
if ($this->tag) {
|
if ($this->tag) {
|
||||||
$subscribers = $this->user->getTaggedSubscribers($this->tag, $offset, $limit);
|
$subscribers = $this->user->getTaggedSubscribers($this->tag, $offset, $limit);
|
||||||
} else {
|
} else {
|
||||||
@ -83,7 +87,7 @@ class SubscribersAction extends GalleryAction
|
|||||||
|
|
||||||
if ($subscribers) {
|
if ($subscribers) {
|
||||||
$subscribers_list = new SubscribersList($subscribers, $this->user, $this);
|
$subscribers_list = new SubscribersList($subscribers, $this->user, $this);
|
||||||
$subscribers_list->show();
|
$cnt = $subscribers_list->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
$subscribers->free();
|
$subscribers->free();
|
||||||
|
@ -84,6 +84,8 @@ class SubscriptionsAction extends GalleryAction
|
|||||||
$offset = ($this->page-1) * PROFILES_PER_PAGE;
|
$offset = ($this->page-1) * PROFILES_PER_PAGE;
|
||||||
$limit = PROFILES_PER_PAGE + 1;
|
$limit = PROFILES_PER_PAGE + 1;
|
||||||
|
|
||||||
|
$cnt = 0;
|
||||||
|
|
||||||
if ($this->tag) {
|
if ($this->tag) {
|
||||||
$subscriptions = $this->user->getTaggedSubscriptions($this->tag, $offset, $limit);
|
$subscriptions = $this->user->getTaggedSubscriptions($this->tag, $offset, $limit);
|
||||||
} else {
|
} else {
|
||||||
@ -92,7 +94,7 @@ class SubscriptionsAction extends GalleryAction
|
|||||||
|
|
||||||
if ($subscriptions) {
|
if ($subscriptions) {
|
||||||
$subscriptions_list = new SubscriptionsList($subscriptions, $this->user, $this);
|
$subscriptions_list = new SubscriptionsList($subscriptions, $this->user, $this);
|
||||||
$subscriptions_list->show();
|
$cnt = $subscriptions_list->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
$subscriptions->free();
|
$subscriptions->free();
|
||||||
|
Loading…
Reference in New Issue
Block a user