X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fgroups.php;h=8aacff8b0ecd1cd2efe86de5b35a6a7b90312f03;hb=63c4eef64322da6a360c9ef3d7e1a20de9ca9cdd;hp=c713d0a98e82b5727cf6b8ad67fd77b3f914572c;hpb=76b0e6e6f4151235d5032d1aa90f0937b415bd87;p=quix0rs-gnu-social.git diff --git a/actions/groups.php b/actions/groups.php index c713d0a98e..8aacff8b0e 100644 --- a/actions/groups.php +++ b/actions/groups.php @@ -88,12 +88,11 @@ class GroupsAction extends Action { $notice = sprintf(_('%%%%site.name%%%% groups let you find and talk with ' . - 'users of similar interests. After you join a group ' . + 'people of similar interests. After you join a group ' . 'you can send messages to all other members using the ' . - 'syntax "!groupname". Are you not seeing any groups ' . - 'you like? Try ' . + 'syntax "!groupname". Don\'t see a group you like? Try ' . '[searching for one](%%%%action.groupsearch%%%%) or ' . - '[start your own](%%%%action.newgroup%%%%)!')); + '[start your own!](%%%%action.newgroup%%%%)')); $this->elementStart('div', 'instructions'); $this->raw(common_markup_to_html($notice)); $this->elementEnd('div'); @@ -110,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');