diff options
author | Sem <sembrestels@riseup.net> | 2012-01-12 16:15:16 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-01-12 16:15:16 +0100 |
commit | cc544cfa2086e418318a899ffd550adfb744c7ba (patch) | |
tree | 6c04fbe2e3df67513aa76803cb8d05c105ba219b /mod/groups/lib | |
parent | e7d64510ebd823f186282e2b80780295bcca1b79 (diff) | |
parent | 68e4829ac0959d86c651e7ed6dc255c39694c8af (diff) | |
download | elgg-cc544cfa2086e418318a899ffd550adfb744c7ba.tar.gz elgg-cc544cfa2086e418318a899ffd550adfb744c7ba.tar.bz2 |
Merge Elgg 1.8.3.
Diffstat (limited to 'mod/groups/lib')
-rw-r--r-- | mod/groups/lib/discussion.php | 6 | ||||
-rw-r--r-- | mod/groups/lib/groups.php | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 2bda4678e..55642644d 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -92,8 +92,8 @@ function discussion_handle_edit_page($type, $guid) { forward(); } - // make sure user has permissions to write to container - if (!$group->canWriteToContainer()) { + // make sure user has permissions to add a topic to container + if (!$group->canWriteToContainer(0, 'object', 'groupforumtopic')) { register_error(elgg_echo('groups:permissions:error')); forward($group->getURL()); } @@ -173,7 +173,7 @@ function discussion_handle_view_page($guid) { 'show_add_form' => false, )); $content .= elgg_view('discussion/closed'); - } elseif ($group->canWriteToContainer() || elgg_is_admin_logged_in()) { + } elseif ($group->canWriteToContainer(0, 'object', 'groupforumtopic') || elgg_is_admin_logged_in()) { $content .= elgg_view('discussion/replies', array( 'entity' => $topic, 'show_add_form' => true, diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 7798e5dc3..5d6083077 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -234,6 +234,8 @@ function groups_handle_invitations_page() { function groups_handle_profile_page($guid) { elgg_set_page_owner_guid($guid); + elgg_push_context('group_profile'); + // turn this into a core function global $autofeed; $autofeed = true; @@ -247,7 +249,11 @@ function groups_handle_profile_page($guid) { $content = elgg_view('groups/profile/layout', array('entity' => $group)); if (group_gatekeeper(false)) { - $sidebar = elgg_view('groups/sidebar/members', array('entity' => $group)); + $sidebar = ''; + 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 = ''; } |