test update language on update
This commit is contained in:
parent
7684f8eb89
commit
49e0379cfd
@ -380,22 +380,6 @@ class install extends common
|
||||
$message = '';
|
||||
$rewrite = $this->getInput('data');
|
||||
|
||||
/**
|
||||
* Met à jour les dictionnaires des langues depuis les nouveaux modèles installés
|
||||
*/
|
||||
require_once('core/module/install/ressource/defaultdata.php');
|
||||
$installedLanguages = $this->getData(['language']);
|
||||
$defaultLanguages = init::$defaultData['language'];
|
||||
foreach ($installedLanguages as $key => $value) {
|
||||
if (
|
||||
isset($defaultLanguages[$key]['version']) &&
|
||||
$defaultLanguages[$key]['version'] > $value['version']
|
||||
) {
|
||||
copy('core/module/install/ressource/i18n/' . $key . '.json', self::I18N_DIR . $key . '.json');
|
||||
$this->setData(['language', $key, $defaultLanguages[$key]]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Restaure le fichier htaccess
|
||||
*/
|
||||
@ -435,6 +419,23 @@ class install extends common
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Met à jour les dictionnaires des langues depuis les nouveaux modèles installés
|
||||
*/
|
||||
require_once('core/module/install/ressource/defaultdata.php');
|
||||
$installedLanguages = $this->getData(['language']);
|
||||
$defaultLanguages = init::$defaultData['language'];
|
||||
foreach ($installedLanguages as $key => $value) {
|
||||
if (
|
||||
isset($defaultLanguages[$key]['version']) &&
|
||||
$defaultLanguages[$key]['version'] > $value['version']
|
||||
) {
|
||||
copy('core/module/install/ressource/i18n/' . $key . '.json', self::I18N_DIR . $key . '.json');
|
||||
$this->setData(['language', $key, $defaultLanguages[$key]]);
|
||||
}
|
||||
}
|
||||
die();
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'display' => self::DISPLAY_JSON,
|
||||
|
Loading…
Reference in New Issue
Block a user