diff --git a/core/core.php b/core/core.php index fc2f53f3..f69c3bd4 100644 --- a/core/core.php +++ b/core/core.php @@ -55,8 +55,6 @@ class common // Numéro de version et branche pour l'auto-update const ZWII_VERSION = '12.3.08'; - const ZWII_DATAVERSION = 12301; - // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/'; const ZWII_UPDATE_CHANNEL = "v12"; @@ -413,10 +411,8 @@ class common } } - // Mise à jour des données core selon la version du jeu de données - if ($this->getData(['core', 'dataVersion']) < common::ZWII_DATAVERSION) { - include('core/include/update.inc.php'); - } + // Mise à jour des données core + include('core/include/update.inc.php'); // Données de proxy diff --git a/core/include/update.inc.php b/core/include/update.inc.php index f76ea082..2a4276ed 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -944,4 +944,24 @@ if ($this->getData(['core', 'dataVersion']) < 12301) { // Mise à jour $this->setData(['core', 'dataVersion', 12301]); +} + +// Version 12.3.08 +if ($this->getData(['core', 'dataVersion']) < 12308) { + + // Langue par défaut + $l = [ + 'fr_FR' => 'Français', + 'en_EN' => 'English', + 'es' => 'Español', + ]; + foreach ($l as $key => $value) { + if (is_dir(self::DATA_DIR . $key )) { + touch(self::DATA_DIR . $key . '/.default'); + break; + } + } + + // Mise à jour + $this->setData(['core', 'dataVersion', 12308]); } \ No newline at end of file diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 282d9675..29a023b0 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -5,6 +5,7 @@ class init extends common 'config' => [ 'autoBackup' => true, 'autoUpdate' => true, + 'autoUpdateDelay' => 86400, 'autoUpdateHtaccess' => false, 'favicon' => 'favicon.ico', 'faviconDark' => 'faviconDark.ico', @@ -44,7 +45,7 @@ class init extends common ] ], 'core' => [ - 'dataVersion' => 12300, + 'dataVersion' => 12301, 'lastBackup' => 0, 'lastClearTmp' => 0, 'lastAutoUpdate' => 0,