diff --git a/app/class/Controller.php b/app/class/Controller.php index b5c5d8d8..827f1820 100644 --- a/app/class/Controller.php +++ b/app/class/Controller.php @@ -102,7 +102,7 @@ public function initplates() $this->plates->addData(['flashmessages' => Model::getflashmessages()]); } - public function showtemplate($template, $params) + public function showtemplate(string $template, array $params = []) { $params = array_merge($this->commonsparams(), $params); echo $this->plates->render($template, $params); diff --git a/app/class/Controlleradmin.php b/app/class/Controlleradmin.php index 2159284d..436ee27a 100644 --- a/app/class/Controlleradmin.php +++ b/app/class/Controlleradmin.php @@ -24,7 +24,7 @@ public function __construct($router) } if (!$this->user->isadmin()) { http_response_code(403); - $this->showtemplate('forbidden', []); + $this->showtemplate('forbidden'); exit; } } diff --git a/app/class/Controllermedia.php b/app/class/Controllermedia.php index a2380922..3fbd7e5a 100644 --- a/app/class/Controllermedia.php +++ b/app/class/Controllermedia.php @@ -33,7 +33,7 @@ public function desktop() { if (!$this->user->iseditor()) { http_response_code(403); - $this->showtemplate('forbidden', []); + $this->showtemplate('forbidden'); exit; } try { diff --git a/app/class/Controlleruser.php b/app/class/Controlleruser.php index b62a6cbb..24e1a0ac 100644 --- a/app/class/Controlleruser.php +++ b/app/class/Controlleruser.php @@ -26,7 +26,7 @@ public function desktop() $this->showtemplate('user', $datas); } else { http_response_code(403); - $this->showtemplate('forbidden', []); + $this->showtemplate('forbidden'); } } @@ -79,7 +79,7 @@ public function update() } } else { http_response_code(403); - $this->showtemplate('forbidden', []); + $this->showtemplate('forbidden'); exit; } }