From 2290eeff81ef46a9377f73c79685ab3a13eaab4e Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Fri, 1 May 2009 14:10:32 +0000 Subject: use is_editable, which comes from userCanEdit which should take all of the removed conditionals into account --- LibertyComment.php | 4 ++-- templates/display_comment.tpl | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/LibertyComment.php b/LibertyComment.php index 6d41328..d6c2926 100644 --- a/LibertyComment.php +++ b/LibertyComment.php @@ -3,7 +3,7 @@ * Management of Liberty Content * * @package liberty - * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyComment.php,v 1.80 2009/03/26 20:20:07 tekimaki_admin Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyComment.php,v 1.81 2009/05/01 14:10:31 spiderr Exp $ * @author spider */ @@ -636,7 +636,7 @@ class LibertyComment extends LibertyMime { $c = new LibertyComment(); $c->mInfo=$row; $c->mRootObj = $this->getRootObj(); - $row['editable'] = $c->userCanEdit(); + $row['is_editable'] = $c->userCanEdit(); global $gBitSystem; if( $gBitSystem->isFeatureActive( 'comments_allow_attachments' ) ){ diff --git a/templates/display_comment.tpl b/templates/display_comment.tpl index 1ad4bfb..7119372 100644 --- a/templates/display_comment.tpl +++ b/templates/display_comment.tpl @@ -13,9 +13,7 @@ {biticon ipackage="icons" iname="mail-reply-sender" iexplain="Reply to this comment"} {/if} {/if} - {* 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 ))} + {if $comment.is_editable} {biticon ipackage="icons" iname="accessories-text-editor" iexplain="Edit"} {/if} {if $gBitUser->hasPermission('p_liberty_admin_comments')} -- cgit v1.3