Pas d'update des fichiers de langues non installés

This commit is contained in:
Fred Tempez 2025-02-06 20:01:52 +01:00
parent 5051e6072c
commit d4e118a578

View File

@ -179,7 +179,8 @@ if ($this->getData(['core', 'dataVersion']) < 10300) {
$this->setData(['config', 'searchPageId', '']);
// Mettre à jour les données des galeries
$hierarchy = array(); foreach ($this->getHierarchy() as $parentKey => $parentValue) {
$hierarchy = array();
foreach ($this->getHierarchy() as $parentKey => $parentValue) {
$hierarchy[] = $parentKey;
foreach ($parentValue as $childKey) {
$hierarchy[] = $childKey;
@ -1110,7 +1111,7 @@ if ($this->getData(['core', 'dataVersion']) < 13101) {
// Supprime le choix du thème à l'installation
if (is_dir('core/module/install/ressource/themes')) {
$this->deleteDir('core/module/install/ressource/themes') ;
$this->deleteDir('core/module/install/ressource/themes');
}
// Mise à jour
@ -1154,19 +1155,23 @@ if (
foreach ($languages as $languageId => $courseValue) {
// Les pages
$filePath = self::DATA_DIR . $languageId . '/page.json';
if (file_exists($filePath) === true) {
$jsonContent = file_get_contents($filePath);
$updatedJsonContent = str_replace('"group":', '"role":', $jsonContent);
if ($updatedJsonContent !== $jsonContent) {
file_put_contents($filePath, $updatedJsonContent);
}
}
// Les modules
$filePath = self::DATA_DIR . $languageId . '/module.json';
if (file_exists($filePath) === true) {
$jsonContent = file_get_contents($filePath);
$updatedJsonContent = str_replace('"group":', '"role":', $jsonContent);
if ($updatedJsonContent !== $jsonContent) {
file_put_contents($filePath, $updatedJsonContent);
}
}
}
$this->setData(['core', 'dataVersion', 13600]);
}