Exemplo n.º 1
0
 function _add_action()
 {
     $mod = new \firegit\app\mod\util\Comment();
     $remark = $this->post('remark');
     if (!$remark) {
         throw new \Exception('hapn.u_args');
     }
     $commentId = $mod->addComment($this->post('type'), $this->post('target_id'), $this->getData('user'), $remark);
     $this->set('comment_id', $commentId);
 }