From 78f023b3b149e1f1c8c9428162e3b6551145b9e1 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 12 Mar 2011 18:45:43 +0000 Subject: Fixes #3071 group "widgets" check permissions now git-svn-id: http://code.elgg.org/elgg/trunk@8667 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/discussion/group_module.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'mod/groups/views') 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 = '

' . elgg_echo('grouptopic:notcreated') . '

'; } -$new_link = elgg_view('output/url', array( - 'href' => "discussion/add/" . $group->getGUID(), - 'text' => elgg_echo('groups:addtopic'), -)); -$content .= "$new_link"; +if ($group->canWriteToContainer()) { + $new_link = elgg_view('output/url', array( + 'href' => "discussion/add/" . $group->getGUID(), + 'text' => elgg_echo('groups:addtopic'), + )); + $content .= "$new_link"; +} echo elgg_view_module('info', '', $content, array('header' => $header)); -- cgit v1.2.3