aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups')
-rw-r--r--mod/groups/all.php17
-rw-r--r--mod/groups/index.php2
-rw-r--r--mod/groups/membership.php3
-rw-r--r--mod/groups/views/default/forms/forums/addpost.php4
-rw-r--r--mod/groups/views/default/forms/forums/addtopic.php2
-rw-r--r--mod/groups/views/default/forms/groups/edit.php9
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
+}
+?>