aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/lib
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/lib')
-rw-r--r--mod/groups/lib/discussion.php5
-rw-r--r--mod/groups/lib/groups.php4
2 files changed, 5 insertions, 4 deletions
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php
index 55642644d..02ab27fdc 100644
--- a/mod/groups/lib/discussion.php
+++ b/mod/groups/lib/discussion.php
@@ -149,8 +149,9 @@ function discussion_handle_view_page($guid) {
$topic = get_entity($guid);
if (!$topic) {
- register_error(elgg_echo('discussion:topic:notfound'));
- forward();
+ register_error(elgg_echo('noaccess'));
+ $_SESSION['last_forward_from'] = current_page_url();
+ forward('');
}
$group = $topic->getContainerEntity();
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php
index 2fe9ae8e0..498766df0 100644
--- a/mod/groups/lib/groups.php
+++ b/mod/groups/lib/groups.php
@@ -245,6 +245,8 @@ function groups_handle_profile_page($guid) {
elgg_push_breadcrumb($group->name);
+ groups_register_profile_buttons($group);
+
$content = elgg_view('groups/profile/layout', array('entity' => $group));
if (group_gatekeeper(false)) {
$sidebar = '';
@@ -256,8 +258,6 @@ function groups_handle_profile_page($guid) {
$sidebar = '';
}
- groups_register_profile_buttons($group);
-
$params = array(
'content' => $content,
'sidebar' => $sidebar,