diff --git a/core/core.php b/core/core.php index f349649c..3dc6df27 100644 --- a/core/core.php +++ b/core/core.php @@ -34,7 +34,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '10.0.009.dev'; + const ZWII_VERSION = '10.0.011.dev'; public static $actions = []; public static $coreModuleIds = [ @@ -538,18 +538,21 @@ class common { if (!file_exists(self::DATA_DIR . '/fr')) { mkdir (self::DATA_DIR . '/fr'); } + + // Un seul fichier pour éviter les erreurs de sauvegarde des v9 + $tempData = array_merge($tempData,$tempTheme); + // Ecriture des données $this->setData(['config',$tempData['config']]); $this->setData(['core',$tempData['core']]); $this->setData(['page',$tempData['page']]); - // Import des modules - $this->setData(['module',$tempData['module']]); + $this->setData(['module',$tempData['module']]); + $this->setData(['theme',$tempData['theme']]); + // Import des users sauvegardés si option active if ($keepUsers === false) { $this->setData(['user',$tempData['user']]); } - // Import du theme - $this->setData(['theme',$tempTheme['theme']]); // Nettoyage du fichier de thème pour forcer une régénération if (file_exists(self::DATA_DIR . '/theme.css')) { // On ne sait jamais @@ -887,74 +890,7 @@ class common { * Mises à jour */ private function update() { - // Version 8.1.0 - if($this->getData(['core', 'dataVersion']) < 810) { - $this->setData(['config', 'timezone', 'Europe/Paris']); - $this->setData(['core', 'dataVersion', 810]); - //$this->SaveData(); - } - // Version 8.2.0 - if($this->getData(['core', 'dataVersion']) < 820) { - $this->setData(['theme', 'body', 'backgroundColor', 'rgba(236, 239, 241, 1)']); - $this->setData(['theme', 'site', 'backgroundColor', 'rgba(255, 255, 255, 1)']); - $this->setData(['theme', 'text', 'fontSize', '13px']); - $this->setData(['theme', 'text', 'textColor', 'rgba(33, 34, 35, 1)']); - $this->setData(['theme', 'menu', 'fontSize', '1em']); - $this->setData(['theme', 'menu', 'textColor', 'rgba(255, 255, 255, 1)']); - $this->setData(['theme', 'header', 'fontSize', '2em']); - $this->setData(['theme', 'footer', 'textColor', 'rgba(33, 34, 35, 1)']); - $this->setData(['core', 'dataVersion', 820]); - //$this->SaveData(); - } - // Version 8.2.2 - if($this->getData(['core', 'dataVersion']) < 822) { - $this->setData(['config', 'maintenance', false]); - $this->setData(['core', 'dataVersion', 822]); - //$this->SaveData(); - } - // Version 8.2.6 - if($this->getData(['core', 'dataVersion']) < 826) { - $this->setData(['theme','header','linkHome',true]); - $this->setData(['core', 'dataVersion', 826]); - //$this->SaveData(); - } - // Version 8.3.1 - if($this->getData(['core', 'dataVersion']) < 831) { - $this->setData(['theme','header','imageContainer','auto']); - $this->setData(['core', 'dataVersion', 831]); - //$this->SaveData(); - } - - // Version 8.4.0 - if($this->getData(['core', 'dataVersion']) < 840) { - $this->setData(['config','itemsperPage',10]); - $this->setData(['core', 'dataVersion', 840]); - //$this->SaveData(); - } - // Version 8.4.4 - if($this->getData(['core', 'dataVersion']) < 844) { - $this->setData(['core', 'dataVersion', 844]); - //$this->SaveData(); - } - // Version 8.4.6 - if($this->getData(['core', 'dataVersion']) < 846) { - $this->setData(['config','itemsperPage',10]); - $this->setData(['core', 'dataVersion', 846]); - //$this->SaveData(); - } - // Version 8.5.0 - if($this->getData(['core', 'dataVersion']) < 850) { - $this->setData(['theme','menu','font','Open+Sans']); - $this->setData(['core', 'dataVersion', 850]); - //$this->SaveData(); - } - // Version 8.5.1 - if($this->getData(['core', 'dataVersion']) < 851) { - $this->setData(['config','itemsperPage',10]); - $this->deleteData(['config','ItemsperPage']); - $this->setData(['core', 'dataVersion', 851]); - //$this->SaveData(); - } + // Version 9.0.0 if($this->getData(['core', 'dataVersion']) < 9000) { $this->deleteData(['theme', 'site', 'block']); @@ -2527,6 +2463,10 @@ class layout extends common { * Affiche la notification */ public function showNotification() { + if (common::$importNotices) { + $notification = common::$importNotices [0]; + $notificationClass = 'notificationSuccess'; + } if(common::$inputNotices) { $notification = 'Impossible de soumettre le formulaire, car il contient des erreurs'; $notificationClass = 'notificationError'; diff --git a/core/module/config/config.php b/core/module/config/config.php index 28555616..8bd986aa 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -373,9 +373,9 @@ class config extends common { $this->setData([ 'config', [ + 'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true), 'analyticsId' => $this->getInput('configAnalyticsId'), 'autoBackup' => $this->getInput('configAutoBackup', helper::FILTER_BOOLEAN), - 'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true), 'maintenance' => $this->getInput('configMaintenance', helper::FILTER_BOOLEAN), 'cookieConsent' => $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN), 'favicon' => $this->getInput('configFavicon'), @@ -393,8 +393,7 @@ class config extends common { 'legalPageId' => $this->getInput('configLegalPageId'), 'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true), 'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true), - 'googTransLogo' => $this->getInput('configdGoogTransLogo', helper::FILTER_BOOLEAN), - 'autoUpdate' => $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN), + 'autoUpdate' => $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN) ] ]); diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index d6f1da76..1af96b4a 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -27,22 +27,21 @@