diff options
Diffstat (limited to 'src/web/_controller/_comments.php')
-rw-r--r-- | src/web/_controller/_comments.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/web/_controller/_comments.php b/src/web/_controller/_comments.php index 059b926..eea792f 100644 --- a/src/web/_controller/_comments.php +++ b/src/web/_controller/_comments.php @@ -3,12 +3,10 @@ class _comments_controller extends Controller { private $comments_model; - function __construct($load) { - parent::__construct($load); - $this->comments_model = $this->load->model('_comments'); + function __construct() { + $this->comments_model = $this->load_model('_comments'); } - public function comments(string $page, string $ref): void { $data = $this->comments_model->get_comments($page); $this->view('comments', array( @@ -79,7 +77,7 @@ class _comments_controller extends Controller { ->post_comment($author, $content, $page, $vulgar); if ($result) { - header('Location: ' . $this->main->get_url($ref) . '#comments'); + header('Location: ' . $this->get_url($ref) . '#comments'); } else { $this->error(500); } |