From cfc6a185aa015176eb27557028621eed4bbb6190 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 23 Nov 2023 15:08:56 +0100 Subject: [PATCH] =?UTF-8?q?D=C3=A9sactiver=20la=20redirection=20du=20routa?= =?UTF-8?q?ge=20en=20cas=20de=20403=20ou=20de=20404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/class/router.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/class/router.class.php b/core/class/router.class.php index 14d3b41..97b82d2 100644 --- a/core/class/router.class.php +++ b/core/class/router.class.php @@ -885,14 +885,14 @@ class core extends common } if ($access === false) { // Bascule sur le site d'accueil - if ( + /*if ( isset($_SESSION['ZWII_SITE_CONTENT']) && $_SESSION['ZWII_SITE_CONTENT'] !== 'home' ) { $_SESSION['ZWII_SITE_CONTENT'] = 'home'; header('Location:' . helper::baseUrl() . $this->getUrl()); exit(); - } + }*/ http_response_code(403); if ($accessInfo['userName']) { $this->addOutput([ @@ -915,15 +915,14 @@ class core extends common } } elseif ($this->output['content'] === '') { // Bascule sur le site d'accueil pour afficher la page d'erreur - - if ( + /*if ( isset($_SESSION['ZWII_SITE_CONTENT']) && $_SESSION['ZWII_SITE_CONTENT'] !== 'home' ) { $_SESSION['ZWII_SITE_CONTENT'] = 'home'; header('Location:' . helper::baseUrl() . $this->getUrl()); exit(); - } + }*/ http_response_code(404); if ( $this->getData(['config', 'page404']) !== 'none'