aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/core/river/controls.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/views/default/core/river/controls.php b/views/default/core/river/controls.php
index 6f2be623c..615da7f96 100644
--- a/views/default/core/river/controls.php
+++ b/views/default/core/river/controls.php
@@ -10,14 +10,16 @@ $object = $vars['item']->getObjectEntity();
if (elgg_is_logged_in()) {
// comments and non-objects cannot be commented on or liked
- if ($object->getType() == 'object' && $vars['item']->annotation_id == 0) {
- $params = array(
- 'href' => '#',
- 'text' => elgg_echo('generic_comments:text'),
- 'class' => 'elgg-toggle',
- 'id' => "elgg-toggler-{$object->getGUID()}",
- );
- echo elgg_view('output/url', $params);
+ if ($vars['item']->annotation_id == 0) {
+ if ($object->canComment()) {
+ $params = array(
+ 'href' => '#',
+ 'text' => elgg_echo('generic_comments:text'),
+ 'class' => 'elgg-toggle',
+ 'id' => "elgg-toggler-{$object->getGUID()}",
+ );
+ echo elgg_view('output/url', $params);
+ }
// like this
if (!elgg_annotation_exists($object->getGUID(), 'likes')) {