aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/lib
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-12-27 15:36:18 -0500
committerBrett Profitt <brett.profitt@gmail.com>2012-12-27 15:36:18 -0500
commit757202e4cb2255f08040611189445aadfc8dbe42 (patch)
treeb6ea31fe3ae75a51e7c4ae86902d6f3b31087604 /mod/groups/lib
parent2d8bef1f96c811dbed0f7636b5acc128d36ee53b (diff)
downloadelgg-757202e4cb2255f08040611189445aadfc8dbe42.tar.gz
elgg-757202e4cb2255f08040611189445aadfc8dbe42.tar.bz2
Fixes #1747. Added "My status" sidebar menu for groups.
Diffstat (limited to 'mod/groups/lib')
-rw-r--r--mod/groups/lib/groups.php27
1 files changed, 23 insertions, 4 deletions
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(