Exemple #1
0
 public function delete_rate()
 {
     $this->requiresLogin();
     $rate_id = $this->id + 0;
     if (!$rate_id) {
         return $this->error(55);
     }
     $model = new rateModel($rate_id);
     if ($model->id != $rate_id) {
         return $this->error(55);
     }
     if ($model->user != Bootstrap::$main->user['id']) {
         return $this->error(19);
     }
     $model->remove();
     $this->rate($model->event, true, false);
     $this->rate($model->event, true, true);
     return $this->status();
 }