diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-17 14:22:35 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-17 14:22:35 -0700 |
commit | 70f56ba43aa77568d96fbc8003619007b01acf8e (patch) | |
tree | d0f60bcfdf8c0f3a41be1227eb3d976125bab482 /modules/comment | |
parent | e82aa6dcd80ce0c41a04e3331b0a63e25c25216f (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.
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/views/comments.html.php | 8 |
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"> </li></ul> - <? endif ?> - <? if ($comments->count()): ?> + <? else: ?> + <ul> <? foreach ($comments as $comment): ?> <li id="g-comment-<?= $comment->id ?>"> |