aboutsummaryrefslogtreecommitdiff
path: root/views/default/core/river/controls.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-21 01:45:21 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-21 01:45:21 +0000
commit25587657328ca8b492a497e385a2fc3887925848 (patch)
tree4cdbe86ac86cc9e658cdef254fb82ba447dea5f4 /views/default/core/river/controls.php
parentbe812b46692dc21dc39932941f421aba32d59b7c (diff)
downloadelgg-25587657328ca8b492a497e385a2fc3887925848.tar.gz
elgg-25587657328ca8b492a497e385a2fc3887925848.tar.bz2
Fixes #2971 added canComment() method and implemented it for ElggBlog
git-svn-id: http://code.elgg.org/elgg/trunk@8381 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/core/river/controls.php')
-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')) {