Vérification de type dans import de 11307 + suppression baseUrl de core + numéro de version de defaultdata
This commit is contained in:
parent
8a96138620
commit
ab37ed0ea9
@ -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]);
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user