From 8105d466c994b0c0a60585fa08e7eb014edd8a16 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 4 Nov 2020 13:22:07 +0100 Subject: [PATCH] redirection maintenance --- core/core.php | 2 +- core/module/maintenance/maintenance.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/core.php b/core/core.php index 5d9cbd10..21d318de 100644 --- a/core/core.php +++ b/core/core.php @@ -1551,7 +1551,7 @@ class core extends common { //$css .= '.button.buttonGrey,.button.buttonGrey:hover{color:' . $this->getData(['theme', 'text', 'textColor']) . '}'; $css .= '.container{max-width:' . $this->getData(['theme', 'site', 'width']) . '}'; $margin = $this->getData(['theme', 'site', 'margin']) ? '0' : '20px'; - $css .= $this->getData(['theme', 'site', 'width']) === '100%' ? '#site.light{margin:100px auto !important;}#site{margin:0 auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}': "#site.light{margin: 100px auto !important;}#site{margin: " . $margin . " auto !important;} body{margin:0px 10px;} #bar{margin: 0 -10px;} body > header{margin: 0 -10px;} body > nav {margin: 0 -10px;} body > footer {margin: 0 -10px;} "; + $css .= $this->getData(['theme', 'site', 'width']) === '100%' ? '#site.light{margin:15px auto !important;}#site{margin:0 auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}': "#site.light{margin: 150px auto !important;}#site{margin: " . $margin . " auto !important;} body{margin:0px 10px;} #bar{margin: 0 -10px;} body > header{margin: 0 -10px;} body > nav {margin: 0 -10px;} body > footer {margin: 0 -10px;} "; $css .= $this->getData(['theme', 'site', 'width']) === '750px' ? '.button, button{font-size:0.8em;}' : ''; $css .= '#site{background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';border-radius:' . $this->getData(['theme', 'site', 'radius']) . ';box-shadow:' . $this->getData(['theme', 'site', 'shadow']) . ' #212223;}'; $css .= '.editorWysiwyg {background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';}'; diff --git a/core/module/maintenance/maintenance.php b/core/module/maintenance/maintenance.php index 9d1dfb88..f20d12d8 100644 --- a/core/module/maintenance/maintenance.php +++ b/core/module/maintenance/maintenance.php @@ -22,6 +22,11 @@ class maintenance extends common { * Maintenance */ public function index() { + // Redirection vers l'accueil après rafraîchissement et que la maintenance est terminée. + if($this->getData(['config', 'maintenance']) == False){ + header('Location:' . helper::baseUrl()); + exit(); + } // Page perso définie et existante if ($this->getData(['config','page302']) !== 'none' AND $this->getData(['page',$this->getData(['config','page302'])]) ) {