diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-01-08 16:09:14 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-01-08 16:09:14 -0500 |
commit | 4f4f5a8be736c36ca8af0cd65731dd7c64da3b1a (patch) | |
tree | 3f6331dc02d3b134d820a2a6ffae8aa5e0cc197c /mod/groups/lib/discussion.php | |
parent | aaeed5d0c3ec561ea691cddeee20563c2b946acd (diff) | |
download | elgg-4f4f5a8be736c36ca8af0cd65731dd7c64da3b1a.tar.gz elgg-4f4f5a8be736c36ca8af0cd65731dd7c64da3b1a.tar.bz2 |
Fixes #3216 passing type/subtype for group discussions
Diffstat (limited to 'mod/groups/lib/discussion.php')
-rw-r--r-- | mod/groups/lib/discussion.php | 6 |
1 files changed, 3 insertions, 3 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, |