Skip to content

Commit

Permalink
Fix for ticket #1163. Don't all guests to a comment when there are no…
Browse files Browse the repository at this point in the history
… comments and the comment access permission is register users.
  • Loading branch information
Tim Almdal committed Jun 17, 2010
1 parent e82aa6d commit 70f56ba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/comment/views/comments.html.php
Expand Up @@ -10,12 +10,16 @@ class="g-button ui-corner-all ui-icon-left ui-state-default">
<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 ?>">
Expand Down

0 comments on commit 70f56ba

Please sign in to comment.