summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-06-17 14:22:35 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-06-17 14:22:35 -0700
commit70f56ba43aa77568d96fbc8003619007b01acf8e (patch)
treed0f60bcfdf8c0f3a41be1227eb3d976125bab482
parente82aa6dcd80ce0c41a04e3331b0a63e25c25216f (diff)
Fix for ticket #1163. Don't all guests to a comment when there are no comments and the comment access permission is register users.
-rw-r--r--modules/comment/views/comments.html.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php
index 9a608a43..1b9f8bbb 100644
--- a/modules/comment/views/comments.html.php
+++ b/modules/comment/views/comments.html.php
@@ -10,12 +10,16 @@
<div id="g-comment-detail">
<? if (!$comments->count()): ?>
<p class="g-no-comments">
+ <? if (comment::can_comment()): ?>
<?= t("No comments yet. Be the first to <a %attrs>comment</a>!",
array("attrs" => html::mark_clean("href=\"" . url::site("form/add/comments/{$item->id}") . "\" class=\"showCommentForm\""))) ?>
+ <? else: ?>
+ <?= t("No comments yet.") ?>
+ <? endif ?>
</p>
<ul><li class="g-no-comments">&nbsp;</li></ul>
- <? endif ?>
- <? if ($comments->count()): ?>
+ <? else: ?>
+
<ul>
<? foreach ($comments as $comment): ?>
<li id="g-comment-<?= $comment->id ?>">