/** * Method that permits to create a new comment * * @access private */ private function create() { if (VPost::submit() == 'Submit Reply') { $comment = new Comment(); $comment->_name = $this->_user['user_username']; $comment->_email = $this->_user['user_email']; $comment->_content = VPost::comment_content(); $comment->_rel_id = VPost::id(); $comment->_rel_type = VPost::type(); $comment->_status = 'approved'; try { $comment->create(); $this->_action_msg = ActionMessages::reply_comment(true); } catch (Exception $e) { $this->_action_msg = ActionMessages::reply_comment($e->getMessage()); } } }