Beispiel #1
0
 /**
  * 异步删除回复
  */
 public function actionDoDelPost()
 {
     $id = $_GET['pid'];
     $tid = $_GET['tid'];
     $model = new GroupPost();
     $post = $model->loadPost($id);
     $tid = $post['tid'];
     $return = $post->delPost();
     if (Yii::app()->request->isAjaxRequest) {
         echo !$return ? -1 : 1;
     } else {
         $this->redirect(array('show', 'tid' => $tid, 'remove' => 'ok'));
     }
 }