Fixed comment removal
This commit is contained in:
parent
b1740fbfcf
commit
019ce6a141
3 changed files with 3 additions and 2 deletions
|
@ -88,7 +88,7 @@ deleteUser.all=nobody
|
||||||
|
|
||||||
listComments=anonymous
|
listComments=anonymous
|
||||||
addComment=registered
|
addComment=registered
|
||||||
deleteComment.self=registered
|
deleteComment.own=registered
|
||||||
deleteComment.all=moderator
|
deleteComment.all=moderator
|
||||||
|
|
||||||
listTags=anonymous
|
listTags=anonymous
|
||||||
|
|
|
@ -90,6 +90,7 @@ class CommentController
|
||||||
public function deleteAction($id)
|
public function deleteAction($id)
|
||||||
{
|
{
|
||||||
$comment = Model_Comment::locate($id);
|
$comment = Model_Comment::locate($id);
|
||||||
|
R::preload($comment, ['commenter' => 'user']);
|
||||||
PrivilegesHelper::confirmWithException(Privilege::DeleteComment, PrivilegesHelper::getIdentitySubPrivilege($comment->commenter));
|
PrivilegesHelper::confirmWithException(Privilege::DeleteComment, PrivilegesHelper::getIdentitySubPrivilege($comment->commenter));
|
||||||
R::trash($comment);
|
R::trash($comment);
|
||||||
$this->context->transport->success = true;
|
$this->context->transport->success = true;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<?php echo $this->context->comment->commenter->name ?>
|
<?php echo $this->context->comment->commenter->name ?>
|
||||||
</a>
|
</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="nickname">[deleted user]</div>
|
[deleted user]
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue