Esempio n. 1
0
 public function actionDeleteComment()
 {
     $post = Yii::$app->request->post();
     $commentId = $post['commentId'];
     if (Yii::$app->user->isGuest) {
         echo json_encode(['status' => 0]);
         return;
     }
     if (CommentsPhoto::isMyComment($commentId)) {
         CommentsPhoto::deleteCommentPhoto($commentId);
     }
     echo json_encode(['status' => '1']);
 }