1.4.22 corrige une erreur 404 depuis un espace n'affichant pas l'erreur de l'accueil

This commit is contained in:
Fred Tempez 2024-02-06 20:30:18 +01:00
parent 7ce30078f6
commit cd03316a9b
2 changed files with 5 additions and 3 deletions

View File

@ -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([

View File

@ -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