diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2009-02-07 08:18:36 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2009-02-07 08:18:36 +0000 |
| commit | ead63f36b20c504047530ffa73dc642f8fa9f50b (patch) | |
| tree | 890812cd1487790c65d3d86f0c0e8bec6e4e90b3 | |
| parent | 0ac664ffc421345c65ba077e1181b96fbcbc0abb (diff) | |
| download | liberty-ead63f36b20c504047530ffa73dc642f8fa9f50b.tar.gz liberty-ead63f36b20c504047530ffa73dc642f8fa9f50b.tar.bz2 liberty-ead63f36b20c504047530ffa73dc642f8fa9f50b.zip | |
only display edit icon when a user has the right to edit a comment
| -rw-r--r-- | templates/display_comment.tpl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/display_comment.tpl b/templates/display_comment.tpl index 5dba599..40cc75f 100644 --- a/templates/display_comment.tpl +++ b/templates/display_comment.tpl @@ -13,8 +13,9 @@ <a href="{$comments_return_url}&post_comment_reply_id={$comment.content_id}&post_comment_request=1#editcomments" rel="nofollow">{biticon ipackage="icons" iname="mail-reply-sender" iexplain="Reply to this comment"}</a> {/if} {/if} - {* if $gBitUser->hasPermission('p_liberty_edit_comments') || ($gBitUser && $comment.user_id == $gBitUser->mInfo.user_id && $comment.user_id!=$smarty.const.ANONYMOUS_USER_ID) *} - {if $comment.is_editable || ($gContent && $gContent->hasUserPermission('p_liberty_edit_comments'))} + {* we can't use gContent->hasUserPermission() here since gContent is the content the comment belongs to, not the comment itself *} + {*if $comment.is_editable || ($gContent && $gContent->hasUserPermission('p_liberty_edit_comments'))*} + {if $comment.is_editable || ( $gBitUser->hasPermission( 'p_liberty_edit_comments' ) || ( $comment.user_id == $gBitUser->mInfo.user_id && $comment.user_id != $smarty.const.ANONYMOUS_USER_ID ))} <a href="{$comments_return_url}&post_comment_id={$comment.comment_id}&post_comment_request=1#editcomments" rel="nofollow">{biticon ipackage="icons" iname="accessories-text-editor" iexplain="Edit"}</a> {/if} {if $gBitUser->hasPermission('p_liberty_admin_comments')} |
