public function deletecomment() { if (!isset($this->post)) { return; } PIREPData::deleteComment($this->post->id); LogData::addLog(Auth::$userinfo->pilotid, 'Deleted a comment'); $this->set('message', 'Comment deleted!'); $this->render('core_success.tpl'); }
public function deletecomment() { $this->checkPermission(MODERATE_PIREPS); if (!isset($this->post)) { return; } PIREPData::deleteComment($this->post->id); LogData::addLog(Auth::$userinfo->pilotid, 'Deleted a comment'); $this->set('message', 'Comment deleted!'); $this->render('core_success.php'); }