diff options
Diffstat (limited to 'mod/groups/lib')
-rw-r--r-- | mod/groups/lib/discussion.php | 5 | ||||
-rw-r--r-- | mod/groups/lib/groups.php | 17 |
2 files changed, 20 insertions, 2 deletions
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index e129e0f9d..2bda4678e 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -60,6 +60,9 @@ function discussion_handle_list_page($guid) { 'full_view' => false, ); $content = elgg_list_entities($options); + if (!$content) { + $content = elgg_echo('discussion:none'); + } $params = array( @@ -189,7 +192,7 @@ function discussion_handle_view_page($guid) { ); $body = elgg_view_layout('content', $params); - echo elgg_view_page($title, $body); + echo elgg_view_page($topic->title, $body); } /** diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 44143d440..7798e5dc3 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -24,6 +24,9 @@ function groups_handle_all_page() { 'inverse_relationship' => false, 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('groups:none'); + } break; case 'discussion': $content = elgg_list_entities(array( @@ -33,6 +36,9 @@ function groups_handle_all_page() { 'limit' => 40, 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('discussion:none'); + } break; case 'newest': default: @@ -40,6 +46,9 @@ function groups_handle_all_page() { 'type' => 'group', 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('groups:none'); + } break; } @@ -107,6 +116,9 @@ function groups_handle_owned_page() { 'owner_guid' => elgg_get_page_owner_guid(), 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('groups:none'); + } $params = array( 'content' => $content, @@ -137,6 +149,9 @@ function groups_handle_mine_page() { 'inverse_relationship' => false, 'full_view' => false, )); + if (!$content) { + $content = elgg_echo('groups:none'); + } $params = array( 'content' => $content, @@ -432,7 +447,7 @@ function groups_register_profile_buttons($group) { } // group members - if ($group->isMember($user)) { + if ($group->isMember(elgg_get_logged_in_user_entity())) { if ($group->getOwnerGUID() != elgg_get_logged_in_user_guid()) { // leave $url = elgg_get_site_url() . "action/groups/leave?group_guid={$group->getGUID()}"; |