public function deleteCommentAtatchment() { $commentArray = $this->getCommentInfoForDelete(); $comment = $commentArray['comment']; $this->deleteAttachmentFiles($comment); $comment->setAttachment(null); $this->commentService->updateComment($comment); exit; }
public function deleteCommentAtatchment() { /* @var $comment BOL_Comment */ $commentArray = $this->getCommentInfoForDelete(); $comment = $commentArray['comment']; $this->deleteAttachmentFiles($comment); if (!trim($comment->getMessage())) { $this->commentService->deleteComment($comment->getId()); } else { $comment->setAttachment(null); $this->commentService->updateComment($comment); } exit; }