summaryrefslogtreecommitdiff
path: root/src/web/_controller/error.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/_controller/error.php')
-rw-r--r--src/web/_controller/error.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/web/_controller/error.php b/src/web/_controller/error.php
index d24308b..30bd797 100644
--- a/src/web/_controller/error.php
+++ b/src/web/_controller/error.php
@@ -3,19 +3,26 @@ class Error_controller extends Controller {
private $error_model;
- function __construct($load) {
- parent::__construct($load);
- $this->error_model = $this->load->model('error');
+ function __construct()
+ {
+ $this->error_model = $this->load_model('error');
}
- public function index(): void {
+ public function code(int $code): void
+ {
parent::index();
- $data = $this->error_model->get_data();
+ $this->load_lang('error');
+
+ $data = $this->error_model->get_data($code);
$this->view('header', $data);
$this->view('apps/error', $data);
$this->view('footer', $data);
}
+ public function index(): void
+ {
+ $this->code(500);
+ }
}
?>