diff --git a/core/core.php b/core/core.php index 8d24da4b..2e345753 100644 --- a/core/core.php +++ b/core/core.php @@ -181,7 +181,7 @@ class common //'fa' => 'فارسی', 'fr_FR' => 'Français', 'he_IL' => 'Hebrew (Israel)', - 'el_GR' => 'Ελληνικά', + 'gr_GR' => 'Ελληνικά', 'hr' => 'Hrvatski jezik', 'hu_HU' => 'Magyar', 'id' => 'Bahasa Indonesia', diff --git a/core/include/update.inc.php b/core/include/update.inc.php index e78e4fde..4c02a60b 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -931,25 +931,7 @@ if ($this->getData(['core', 'dataVersion']) < 12000) { if ($this->getData(['core', 'dataVersion']) < 12300) { // Valeur par défaut du délai de recherche de mise à jour en ligne $this->setData(['config', 'autoUpdateDelay', 86400]); - // Changement de nom des fichiers de langue greque - if (file_exists('core/module/install/ressource/i18n/gr_GR.json')) { - unlink('core/module/install/ressource/i18n/gr_GR.json'); - } - if (file_exists(self::I18N_DIR . 'gr_GR.json')) { - rename(self::I18N_DIR . 'gr_GR.json', self::I18N_DIR . 'el_GR.json'); - } - $d = $this->getData(['languages', 'gr_GR']); - if ($d) { - $this->setData(['languages', 'el_GR', $d]); - $this->deleteData(['languages', 'gr_GR']); - } - // Idem pour les modules - $moduleIds = ['blog', 'news', 'gallery', 'search', 'redirection', 'form']; - foreach ($moduleIds as $key => $value) { - if (file_exists('module/' . $value . '/i18n/gr_GR.json')) { - unlink('module/' . $value . '/i18n/gr_GR.json'); - } - } + // Nettoyage de flatPickr if (is_dir('core/vendor/flatpickr')) { diff --git a/core/module/install/install.php b/core/module/install/install.php index f97c6504..4912b048 100644 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -234,13 +234,6 @@ class install extends common // Fixe l'adresse from pour les envois d'email $this->setData(['config', 'smtp', 'from', 'no-reply@' . str_replace('www.', '', $_SERVER['HTTP_HOST'])]); - // Création de la liste des pages et du sitemap uniquement en FR, autres sites sont vides. - // Mise à jour de la liste des pages pour TinyMCE - $this->listPages(); - - // Créer sitemap - $this->createSitemap(); - // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl(true) . $this->getData(['locale', 'homePageId']), diff --git a/core/module/page/page.php b/core/module/page/page.php index c9c14031..52b525bc 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -553,6 +553,13 @@ class page extends common self::$pagesBarId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']); } } + + // Met à jour le site map + $this->createSitemap('all'); + + // Mise à jour de la liste des pages pour TinyMCE + $this->listPages(); + // Valeurs en sortie $this->addOutput([ 'title' => $this->getData(['page', $this->getUrl(2), 'title']), @@ -571,7 +578,7 @@ class page extends common { // Soumission du formulaire if ($this->isPost()) { - $css = $this->getInput('pageCssEditorContent') === null ? '': $this->getInput('pageCssEditorContent'); + $css = $this->getInput('pageCssEditorContent') === null ? '' : $this->getInput('pageCssEditorContent'); // Enregistre le CSS $this->setData([ 'page', $this->getUrl(2), diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index 4b9fb1af..7c1ad29c 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -175,6 +175,14 @@ class translate extends common // Langues installées $installedUI = $this->getData(['language']); + // Check si la langue est bien disponible sinon la supprime de la BDD + if ($installedUI) { + foreach ($installedUI as $key => $value) + if (file_exists(self::I18N_DIR . $key . '.json' ) === false ) { + $this->deleteData(['languages', $key]); + } + } + // Langues disponibles avec la mise à jour $store = json_decode(file_get_contents('core/module/install/ressource/i18n/language.json'), true); if (array_key_exists('languages', $store )) { diff --git a/core/vendor/filemanager/lang/el_GR.php b/core/vendor/filemanager/lang/gr_GR.php similarity index 100% rename from core/vendor/filemanager/lang/el_GR.php rename to core/vendor/filemanager/lang/gr_GR.php diff --git a/core/vendor/filemanager/lang/languages.php b/core/vendor/filemanager/lang/languages.php index 2ecc4c98..86614068 100644 --- a/core/vendor/filemanager/lang/languages.php +++ b/core/vendor/filemanager/lang/languages.php @@ -2,7 +2,7 @@ return array( 'de' => 'Deutsch', - 'el_GR' => 'ελληνικά', + 'gr_GR' => 'ελληνικά', 'en_EN' => 'English', 'es' => 'Español', 'fr_FR' => 'Français', diff --git a/module/blog/i18n/el_GR.json b/module/blog/i18n/gr_GR.json similarity index 100% rename from module/blog/i18n/el_GR.json rename to module/blog/i18n/gr_GR.json diff --git a/module/form/i18n/el_GR.json b/module/form/i18n/gr_GR.json similarity index 100% rename from module/form/i18n/el_GR.json rename to module/form/i18n/gr_GR.json diff --git a/module/gallery/i18n/el_GR.json b/module/gallery/i18n/gr_GR.json similarity index 100% rename from module/gallery/i18n/el_GR.json rename to module/gallery/i18n/gr_GR.json diff --git a/module/news/i18n/el_GR.json b/module/news/i18n/gr_GR.json similarity index 100% rename from module/news/i18n/el_GR.json rename to module/news/i18n/gr_GR.json diff --git a/module/redirection/i18n/el_GR.json b/module/redirection/i18n/gr_GR.json similarity index 100% rename from module/redirection/i18n/el_GR.json rename to module/redirection/i18n/gr_GR.json diff --git a/module/search/i18n/el_GR.json b/module/search/i18n/gr_GR.json similarity index 100% rename from module/search/i18n/el_GR.json rename to module/search/i18n/gr_GR.json