Ejemplo n.º 1
0
 /**
  * 
  * 添加评论
  */
 public function addComment()
 {
     if (IS_POST) {
         $PS = new PaperService();
         if (($res = $PS->doAddComment(I('post.'))) == true) {
             redirect(U('Forum/index', array('id' => I('post.post_id'))));
         } else {
             $this->error($res, U('Forum/index', array('id' => I('post.post_id')), 2));
         }
     } else {
         redirect(U('Forum/index', array('id' => I('id'))));
     }
 }