forked from ZwiiCMS-Team/ZwiiCampus
Route les erreurs 403, 404 vers le site principal
This commit is contained in:
parent
c9d510e03f
commit
4d00677fa6
@ -884,6 +884,12 @@ class core extends common
|
||||
exit();
|
||||
}
|
||||
if ($access === false) {
|
||||
// Bascule sur le site d'accueil
|
||||
if ($_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([
|
||||
@ -905,6 +911,12 @@ class core extends common
|
||||
}
|
||||
}
|
||||
} elseif ($this->output['content'] === '') {
|
||||
// Bascule sur le site d'accueil pour afficher la page d'erreur
|
||||
if ($_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'
|
||||
|
Loading…
Reference in New Issue
Block a user