aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/lib/groups.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/lib/groups.php')
-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(