aboutsummaryrefslogtreecommitdiff
path: root/mod/file
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file')
-rw-r--r--mod/file/views/default/file/group_module.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/mod/file/views/default/file/group_module.php b/mod/file/views/default/file/group_module.php
index c82e499ec..de8c62098 100644
--- a/mod/file/views/default/file/group_module.php
+++ b/mod/file/views/default/file/group_module.php
@@ -34,10 +34,12 @@ if (!$content) {
$content = '<p>' . elgg_echo('file:none') . '</p>';
}
-$new_link = elgg_view('output/url', array(
- 'href' => "file/add/$group->guid",
- 'text' => elgg_echo('file:add'),
-));
-$content .= "<span class='elgg-widget-more'>$new_link</span>";
+if ($group->canWriteToContainer()) {
+ $new_link = elgg_view('output/url', array(
+ 'href' => "file/add/$group->guid",
+ 'text' => elgg_echo('file:add'),
+ ));
+ $content .= "<span class='elgg-widget-more'>$new_link</span>";
+}
echo elgg_view_module('info', '', $content, array('header' => $header));