diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-02-16 11:48:34 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-02-16 11:48:34 -0200 |
commit | b6ee1b93376d42f8a8fcee0127bc10f84d1e018e (patch) | |
tree | cbde5e4d0b745c3bb854c215bccea8b2d6bb367e /mod/groups/lib | |
parent | 694306cf537fb8cb45beb7d4fd63c5b56cb5c4da (diff) | |
parent | 5aff5b3913fbb6226d8fb3162453c58888fba38d (diff) | |
download | elgg-b6ee1b93376d42f8a8fcee0127bc10f84d1e018e.tar.gz elgg-b6ee1b93376d42f8a8fcee0127bc10f84d1e018e.tar.bz2 |
Merge branch 'master' into saravea
Diffstat (limited to 'mod/groups/lib')
-rw-r--r-- | mod/groups/lib/groups.php | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 505cacd01..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(), @@ -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( |