diff options
author | Sem <sembrestels@riseup.net> | 2012-07-20 07:09:38 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-07-20 07:09:38 +0200 |
commit | 07b599a683760d2542014bb04a681463420a3565 (patch) | |
tree | cfcd06671529eeec7790fb70a8d490094d7942c9 /mod/groups/lib | |
parent | ea0140d87534c3b10e489d13a1449ebb79da832d (diff) | |
parent | 174763bcbcd20812dc09f27b64908f9d71b523b9 (diff) | |
download | elgg-07b599a683760d2542014bb04a681463420a3565.tar.gz elgg-07b599a683760d2542014bb04a681463420a3565.tar.bz2 |
Merge branch 'lorea-preprod'
Conflicts:
.gitmodules
Diffstat (limited to 'mod/groups/lib')
-rw-r--r-- | mod/groups/lib/discussion.php | 7 | ||||
-rw-r--r-- | mod/groups/lib/groups.php | 18 |
2 files changed, 18 insertions, 7 deletions
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 55642644d..ab2fe4849 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -15,7 +15,7 @@ function discussion_handle_all_page() { 'type' => 'object', 'subtype' => 'groupforumtopic', 'order_by' => 'e.last_action desc', - 'limit' => 40, + 'limit' => 20, 'full_view' => false, )); @@ -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..51ae89a87 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -106,7 +106,11 @@ function groups_handle_owned_page() { $page_owner = elgg_get_page_owner_entity(); - $title = elgg_echo('groups:owned'); + if ($page_owner->guid == elgg_get_logged_in_user_guid()) { + $title = elgg_echo('groups:owned'); + } else { + $title = elgg_echo('groups:owned:user', array($page_owner->name)); + } elgg_push_breadcrumb($title); elgg_register_title_button(); @@ -137,7 +141,11 @@ function groups_handle_mine_page() { $page_owner = elgg_get_page_owner_entity(); - $title = elgg_echo('groups:yours'); + if ($page_owner->guid == elgg_get_logged_in_user_guid()) { + $title = elgg_echo('groups:yours'); + } else { + $title = elgg_echo('groups:user', array($page_owner->name)); + } elgg_push_breadcrumb($title); elgg_register_title_button(); @@ -238,6 +246,8 @@ function groups_handle_profile_page($guid) { global $autofeed; $autofeed = true; + elgg_push_context('group_profile'); + $group = get_entity($guid); if (!$group) { forward('groups/all'); @@ -245,6 +255,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 +268,6 @@ function groups_handle_profile_page($guid) { $sidebar = ''; } - groups_register_profile_buttons($group); - $params = array( 'content' => $content, 'sidebar' => $sidebar, |