Merge branch '12300' into 12400

This commit is contained in:
Fred Tempez 2023-03-05 16:28:44 +01:00
commit e601461101
2 changed files with 13 additions and 8 deletions

View File

@ -27,14 +27,7 @@ if (file_exists('site/data/core.json')) {
sleep(1);
}
// Avant version 12.3.00
if ($version['core']['dataVersion'] < 12300) {
// Nettoyage du dossier de langue de TinyMCE
unlink('core/vendor/tinymce/langs/*.js');
unlink('core/vendor/tinymce/langs/langs.zip');
unlink('core/vendor/tinymce/langs/README.md');
}
// Renomme les bases de données
if ($version['core']['dataVersion'] < 12400) {
if (file_exists('core/module/install/ressource/i18n/languages.json'))
rename('core/module/install/ressource/i18n/languages.json', 'core/module/install/ressource/i18n/language.json');

View File

@ -942,6 +942,18 @@ if ($this->getData(['core', 'dataVersion']) < 12300) {
$this->deleteData(['config', 'smtp', 'sender']);
$this->setData(['config', 'smtp', 'from', 'no-reply@' . str_replace('www.', '', $_SERVER['HTTP_HOST'])]);
// Nettoyage du dossier de langue d'installation'
unlink('core/vendor/tinymce/langs/langs.zip');
if (file_exists('core/module/install/ressource/i18n/de.json'))
unlink('core/module/install/ressource/i18n/de.json');
if (file_exists('core/module/install/ressource/i18n/it.json'))
unlink('core/module/install/ressource/i18n/it.json');
if (file_exists('core/module/install/ressource/i18n/pt_PT.json'))
unlink('core/module/install/ressource/i18n/pt_PT.json');
if (file_exists('core/module/install/ressource/i18n/gr_GR.json'))
unlink('core/module/install/ressource/i18n/gr_GR.json');
// Mise à jour
$this->setData(['core', 'dataVersion', 12300]);
}