From cd03316a9b7ea59942aa05912e8ebca35fdc75bc Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 6 Feb 2024 20:30:18 +0100 Subject: [PATCH] 1.4.22 corrige une erreur 404 depuis un espace n'affichant pas l'erreur de l'accueil --- core/class/router.class.php | 6 ++++-- core/core.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/class/router.class.php b/core/class/router.class.php index 84e98d1..17922c2 100644 --- a/core/class/router.class.php +++ b/core/class/router.class.php @@ -822,8 +822,9 @@ class core extends common } else { if ( $this->getData(['config', 'page403']) !== 'none' - and $this->getData(['page', $this->getData(['config', 'page403'])]) + //and $this->getData(['page', $this->getData(['config', 'page403'])]) ) { + $_SESSION['ZWII_SITE_CONTENT'] = 'home'; header('Location:' . helper::baseUrl() . $this->getData(['config', 'page403'])); } else { $this->addOutput([ @@ -836,8 +837,9 @@ class core extends common http_response_code(404); if ( $this->getData(['config', 'page404']) !== 'none' - and $this->getData(['page', $this->getData(['config', 'page404'])]) + //and $this->getData(['page', $this->getData(['config', 'page404'])]) ) { + $_SESSION['ZWII_SITE_CONTENT'] = 'home'; header('Location:' . helper::baseUrl() . $this->getData(['config', 'page404'])); } else { $this->addOutput([ diff --git a/core/core.php b/core/core.php index cf01d85..75a5687 100644 --- a/core/core.php +++ b/core/core.php @@ -329,7 +329,7 @@ class common // Extraction de la sesion // $this->input['_SESSION'] = $_SESSION; - +echo $_SESSION['ZWII_SITE_CONTENT']; // Déterminer le contenu du site if (isset($_SESSION['ZWII_SITE_CONTENT'])) { // Déterminé par la session présente