summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2009-05-01 14:10:32 +0000
committerChristian Fowler <spider@viovio.com>2009-05-01 14:10:32 +0000
commit2290eeff81ef46a9377f73c79685ab3a13eaab4e (patch)
tree94b92cb66ef7871473802ab20059583f68050167
parent221022f675502f7659cfcaa89d53b15f21869d0f (diff)
downloadliberty-2290eeff81ef46a9377f73c79685ab3a13eaab4e.tar.gz
liberty-2290eeff81ef46a9377f73c79685ab3a13eaab4e.tar.bz2
liberty-2290eeff81ef46a9377f73c79685ab3a13eaab4e.zip
use is_editable, which comes from userCanEdit which should take all of the removed conditionals into account
-rw-r--r--LibertyComment.php4
-rw-r--r--templates/display_comment.tpl4
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 <spider@steelsun.com>
*/
@@ -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 @@
<a href="{$comments_return_url}&amp;post_comment_reply_id={$comment.content_id}&amp;post_comment_request=1#editcomments" rel="nofollow">{biticon ipackage="icons" iname="mail-reply-sender" iexplain="Reply to this comment"}</a>
{/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}
<a href="{$comments_return_url}&amp;post_comment_id={$comment.comment_id}&amp;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')}