diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-12 17:03:51 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-12 17:03:51 +0000 |
commit | 73ed4ae8513af1cc6e795b125cc1f319a965bfb4 (patch) | |
tree | 86681c6baee8869faab58940588251be692dd9e4 /mod/groups/all.php | |
parent | c41553d5e532ca86070d511d50d150d97869bb84 (diff) | |
download | elgg-73ed4ae8513af1cc6e795b125cc1f319a965bfb4.tar.gz elgg-73ed4ae8513af1cc6e795b125cc1f319a965bfb4.tar.bz2 |
Merged Cash's bugfixes from the 1.7 branch (3288:5377).
git-svn-id: http://code.elgg.org/elgg/trunk@5378 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/all.php')
-rw-r--r-- | mod/groups/all.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/mod/groups/all.php b/mod/groups/all.php index 1d9f36dc5..c4347c1e4 100644 --- a/mod/groups/all.php +++ b/mod/groups/all.php @@ -15,29 +15,30 @@ $offset = get_input("offset", 0); $tag = get_input("tag"); $filter = get_input("filter"); - if(!$filter) + if (!$filter) { + // active discussions is the default $filter = "active"; + } // Get objects $context = get_context(); set_context('search'); - if ($tag != "") - $objects = list_entities_from_metadata('tags',$tag,'group',"","", $limit, false); - else{ + if ($tag != "") { + // groups plugin saves tags as "interests" - see groups_fields_setup() in start.php + $objects = list_entities_from_metadata('interests',$tag,'group',"","", $limit, false); + } else { switch($filter){ case "newest": - $objects = elgg_list_entities(array('types' => 'group', 'owner_guid' => 0, 'limit' => $limit, 'full_view' => false)); + $objects = elgg_list_entities(array('types' => 'group', 'owner_guid' => 0, 'limit' => $limit, 'offset' => $offset, 'full_view' => false)); break; case "pop": $objects = list_entities_by_relationship_count('member', true, "", "", 0, $limit, false); break; case "active": - $objects = list_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 40, 0, 0, false, true); - break; case 'default': - $objects = elgg_list_entities(array('types' => 'group', 'limit' => $limit, 'full_view' => FALSE)); + $objects = list_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 40, 0, 0, false, true); break; } } |