diff options
Diffstat (limited to 'mod/groups/views/default/discussion')
-rw-r--r-- | mod/groups/views/default/discussion/group_module.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php index cbefe8e7c..165d9b1be 100644 --- a/mod/groups/views/default/discussion/group_module.php +++ b/mod/groups/views/default/discussion/group_module.php @@ -37,10 +37,12 @@ if (!$content) { $content = '<p>' . elgg_echo('grouptopic:notcreated') . '</p>'; } -$new_link = elgg_view('output/url', array( - 'href' => "discussion/add/" . $group->getGUID(), - 'text' => elgg_echo('groups:addtopic'), -)); -$content .= "<span class='elgg-widget-more'>$new_link</span>"; +if ($group->canWriteToContainer()) { + $new_link = elgg_view('output/url', array( + 'href' => "discussion/add/" . $group->getGUID(), + 'text' => elgg_echo('groups:addtopic'), + )); + $content .= "<span class='elgg-widget-more'>$new_link</span>"; +} echo elgg_view_module('info', '', $content, array('header' => $header)); |