Fixed comment removal

This commit is contained in:
Marcin Kurczewski
2013-10-19 20:13:46 +02:00
parent b1740fbfcf
commit 019ce6a141
3 changed files with 3 additions and 2 deletions

View File

@ -90,6 +90,7 @@ class CommentController
public function deleteAction($id)
{
$comment = Model_Comment::locate($id);
R::preload($comment, ['commenter' => 'user']);
PrivilegesHelper::confirmWithException(Privilege::DeleteComment, PrivilegesHelper::getIdentitySubPrivilege($comment->commenter));
R::trash($comment);
$this->context->transport->success = true;