diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 0c36717b..1766a28e 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -924,7 +924,8 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { $files = $this->getData(['fonts', 'files']); if (is_array($files)) { foreach ($files as $fontId => $fontName) { - if (file_exists(self::DATA_DIR . 'fonts/' . $fontName)) { + if ( gettype($fontName) === 'string' + && file_exists(self::DATA_DIR . 'fonts/' . $fontName)) { $this->setData(['fonts', 'files', $fontId, [ 'name' => ucfirst($fontId), 'font-family'=> '\'' . ucfirst($fontId) . '\', sans-serif', @@ -938,11 +939,13 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { $imported = $this->getData(['fonts', 'imported']); if (is_array($imported)) { foreach ($imported as $fontId => $fontUrl) { - $this->setData(['fonts', 'imported', $fontId, [ - 'name' => ucfirst($fontId), - 'font-family'=> '\'' . ucfirst($fontId) . '\', sans-serif', - 'resource' => 'https:\\fonts.cdnfonts.com\css' . $fontUrl - ]]); + if ( gettype($fontUrl) === 'string' ) { + $this->setData(['fonts', 'imported', $fontId, [ + 'name' => ucfirst($fontId), + 'font-family'=> '\'' . ucfirst($fontId) . '\', sans-serif', + 'resource' => 'https:\\fonts.cdnfonts.com\css' . $fontUrl + ]]); + } } } // Importation des fontes exemples @@ -974,7 +977,7 @@ if ($this->getData(['core', 'dataVersion']) < 11400) { */ // Suppression de la variable URL dans core - //$this->deleteData(['core', 'baseUrl']); + $this->deleteData(['core', 'baseUrl']); // Mise à jour $this->setData(['core', 'dataVersion', 11400]); diff --git a/core/module/config/config.php b/core/module/config/config.php index 92ac7a09..02ed0b45 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -573,8 +573,6 @@ class config extends common { // Change le statut de la réécriture d'URL (pour le helper::baseUrl() de la redirection) helper::$rewriteStatus = false; } - // Met à jour la baseUrl - $this->setData(['core', 'baseUrl', helper::baseUrl(true,false) ]); } // Générer robots.txt et sitemap $this->siteMap(); diff --git a/core/module/install/install.php b/core/module/install/install.php index 3bfba425..54f677c3 100644 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -122,9 +122,6 @@ class install extends common { mkdir(self::DATA_DIR . 'fonts'); } - // Stocker le dossier d'installation - $this->setData(['core', 'baseUrl', helper::baseUrl(false,false) ]); - // Installation du thème sélectionné $dataThemes = file_get_contents('core/module/install/ressource/themes/themes.json'); $dataThemes = json_decode($dataThemes, true); diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 29cbd3cb..0bc0ecc2 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -57,12 +57,11 @@ class init extends common { ] ], 'core' => [ - 'dataVersion' => 11300, + 'dataVersion' => 11400, 'lastBackup' => 0, 'lastClearTmp' => 0, 'lastAutoUpdate' => 0, - 'updateAvailable' => false, - 'baseUrl' => '' + 'updateAvailable' => false ], 'locale' => [ 'homePageId' => 'accueil',