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 | |
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')
-rw-r--r-- | mod/groups/all.php | 17 | ||||
-rw-r--r-- | mod/groups/index.php | 2 | ||||
-rw-r--r-- | mod/groups/membership.php | 3 | ||||
-rw-r--r-- | mod/groups/views/default/forms/forums/addpost.php | 4 | ||||
-rw-r--r-- | mod/groups/views/default/forms/forums/addtopic.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/forms/groups/edit.php | 9 |
6 files changed, 21 insertions, 16 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; } } diff --git a/mod/groups/index.php b/mod/groups/index.php index d23fe7360..501e6e288 100644 --- a/mod/groups/index.php +++ b/mod/groups/index.php @@ -20,7 +20,7 @@ $area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups')); set_context('search'); - $objects = elgg_list_entities(array('types' => 'group', 'owner_guid' => page_owner(), 'limit' => $limit, 'full_view' => FALSE)); + $objects = elgg_list_entities(array('types' => 'group', 'owner_guid' => page_owner(), 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE)); set_context('groups'); $area1 .= $objects; diff --git a/mod/groups/membership.php b/mod/groups/membership.php index 4b5d6b89f..ac3ad7439 100644 --- a/mod/groups/membership.php +++ b/mod/groups/membership.php @@ -26,6 +26,7 @@ $area2 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'groups')); set_context('search'); + // offset is grabbed in the list_entities_from_relationship() function $objects = list_entities_from_relationship('member',page_owner(),false,'group','',0, $limit,false, false); set_context('groups'); @@ -34,4 +35,4 @@ // Finally draw the page page_draw($title, $body); -?>
\ No newline at end of file +?> diff --git a/mod/groups/views/default/forms/forums/addpost.php b/mod/groups/views/default/forms/forums/addpost.php index 8aa316caa..3ad3de0ff 100644 --- a/mod/groups/views/default/forms/forums/addpost.php +++ b/mod/groups/views/default/forms/forums/addpost.php @@ -29,6 +29,6 @@ <input type="hidden" name="group_guid" value="<?php echo $vars['entity']->container_guid; ?>" /> <?php echo elgg_view('input/securitytoken'); ?> - <!-- display the save button --> + <!-- display the post button --> <input type="submit" class="submit_button" value="<?php echo elgg_echo('post'); ?>" /> -</form>
\ No newline at end of file +</form> diff --git a/mod/groups/views/default/forms/forums/addtopic.php b/mod/groups/views/default/forms/forums/addtopic.php index e3bc3e1c6..9dd70d7a8 100644 --- a/mod/groups/views/default/forms/forums/addtopic.php +++ b/mod/groups/views/default/forms/forums/addtopic.php @@ -99,7 +99,7 @@ <!-- required hidden info and submit button --> <p> <input type="hidden" name="group_guid" value="<?php echo $group_guid; ?>" /> - <input type="submit" class="submit_button" value="<?php echo elgg_echo('save'); ?>" /> + <input type="submit" class="submit_button" value="<?php echo elgg_echo('post'); ?>" /> </p> </form> diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php index 810c29bc9..3712add82 100644 --- a/mod/groups/views/default/forms/groups/edit.php +++ b/mod/groups/views/default/forms/groups/edit.php @@ -138,19 +138,22 @@ </form> +<?php +if ($vars['entity']) { +?> <div class="delete_group"> <form action="<?php echo $vars['url'] . "action/groups/delete"; ?>"> <?php echo elgg_view('input/securitytoken'); - if ($vars['entity']) { $warning = elgg_echo("groups:deletewarning"); ?> <input type="hidden" name="group_guid" value="<?php echo $vars['entity']->getGUID(); ?>" /> <input type="submit" class="action_button disabled" name="delete" value="<?php echo elgg_echo('groups:delete'); ?>" onclick="javascript:return confirm('<?php echo $warning; ?>')"/><?php - } ?> </form> </div> - +<?php +} +?> |