public function report($text = '') { $comment_report = new Comment_report(); $comment_report->comment_id = $this->id; if ($text != '') { $comment_report->text = $text; } $comment_report->time_of_creation = time(); $comment_report->save(); }
public function delete_report($id) { $comment_report = new Comment_report($id); $comment_report->delete(); redirect(base_url('/admin/module/blog/show_objects/comment_report'), 'location'); }