public function flagcommentAction() { if ($value_id = $this->getRequest()->getParam('value_id') and $answer_id = $this->getRequest()->getParam('answer_id')) { $application = $this->getApplication(); $answer = new Comment_Model_Answer(); $answer->find($answer_id); $comment = new Comment_Model_Comment(); $comment->find($answer->getCommentId()); if ($answer->getId() and $comment->getValueId() == $value_id) { $answer->setFlag($answer->getFlag() + 1); $answer->save(); $message = $this->_('Your flag has successfully been notified'); $html = array('success' => 1, 'message' => $message); $this->_sendHtml($html); } } }