summaryrefslogtreecommitdiff
path: root/actions/groups.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-03-08 17:22:23 -0500
committerCraig Andrews <candrews@integralblue.com>2010-03-08 17:22:23 -0500
commit714d920faea302b55857cc3bec4e9e6160ea136a (patch)
treecffa5ee7a3261ad24b272cb3ced16a6c1dcafad1 /actions/groups.php
parentc187bf55974347f7ddb4f28714af57861dce8f08 (diff)
parent51a245f18c1e4a830c5eb94f3e60c6b4b3e560ee (diff)
Merge branch '0.9.x' into 1.0.x
Conflicts: classes/statusnet.ini db/statusnet.sql lib/jabber.php lib/xmppmanager.php
Diffstat (limited to 'actions/groups.php')
-rw-r--r--actions/groups.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/actions/groups.php b/actions/groups.php
index 10a1d5964..8aacff8b0 100644
--- a/actions/groups.php
+++ b/actions/groups.php
@@ -109,17 +109,21 @@ class GroupsAction extends Action
}
$offset = ($this->page-1) * GROUPS_PER_PAGE;
- $limit = GROUPS_PER_PAGE + 1;
+ $limit = GROUPS_PER_PAGE + 1;
+
+ $qry = 'SELECT user_group.* '.
+ 'from user_group join local_group on user_group.id = local_group.group_id '.
+ 'order by user_group.created desc '.
+ 'limit ' . $limit . ' offset ' . $offset;
$groups = new User_group();
- $groups->orderBy('created DESC');
- $groups->limit($offset, $limit);
$cnt = 0;
- if ($groups->find()) {
- $gl = new GroupList($groups, null, $this);
- $cnt = $gl->show();
- }
+
+ $groups->query($qry);
+
+ $gl = new GroupList($groups, null, $this);
+ $cnt = $gl->show();
$this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE,
$this->page, 'groups');