From 757202e4cb2255f08040611189445aadfc8dbe42 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Thu, 27 Dec 2012 15:36:18 -0500 Subject: Fixes #1747. Added "My status" sidebar menu for groups. --- mod/groups/lib/groups.php | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'mod/groups/lib') diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 505cacd01..ea7308d39 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -264,14 +264,33 @@ function groups_handle_profile_page($guid) { groups_register_profile_buttons($group); $content = elgg_view('groups/profile/layout', array('entity' => $group)); - if (group_gatekeeper(false)) { - $sidebar = ''; + $sidebar = ''; + + if (group_gatekeeper(false)) { if (elgg_is_active_plugin('search')) { $sidebar .= elgg_view('groups/sidebar/search', array('entity' => $group)); } $sidebar .= elgg_view('groups/sidebar/members', array('entity' => $group)); - } else { - $sidebar = ''; + + $subscribed = false; + if (elgg_is_active_plugin('notifications')) { + global $NOTIFICATION_HANDLERS; + + foreach ($NOTIFICATION_HANDLERS as $method => $foo) { + $relationship = check_entity_relationship(elgg_get_logged_in_user_guid(), + 'notify' . $method, $guid); + + if ($relationship) { + $subscribed = true; + break; + } + } + } + + $sidebar .= elgg_view('groups/sidebar/my_status', array( + 'entity' => $group, + 'subscribed' => $subscribed + )); } $params = array( -- cgit v1.2.3 From 3c65e1e606395a0d22b909719fe66d494c31c762 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 25 Jan 2013 16:00:43 -0500 Subject: Fixes #5005 correct pagination for my groups --- mod/groups/lib/groups.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/groups/lib') diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index ea7308d39..d8d0f568d 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -152,7 +152,7 @@ function groups_handle_mine_page() { elgg_register_title_button(); - $content = elgg_list_entities_from_relationship_count(array( + $content = elgg_list_entities_from_relationship(array( 'type' => 'group', 'relationship' => 'member', 'relationship_guid' => elgg_get_page_owner_guid(), -- cgit v1.2.3