Pas d'update des fichiers de langues non installés
This commit is contained in:
parent
5051e6072c
commit
d4e118a578
@ -179,7 +179,8 @@ if ($this->getData(['core', 'dataVersion']) < 10300) {
|
|||||||
$this->setData(['config', 'searchPageId', '']);
|
$this->setData(['config', 'searchPageId', '']);
|
||||||
|
|
||||||
// Mettre à jour les données des galeries
|
// 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;
|
$hierarchy[] = $parentKey;
|
||||||
foreach ($parentValue as $childKey) {
|
foreach ($parentValue as $childKey) {
|
||||||
$hierarchy[] = $childKey;
|
$hierarchy[] = $childKey;
|
||||||
@ -1154,19 +1155,23 @@ if (
|
|||||||
foreach ($languages as $languageId => $courseValue) {
|
foreach ($languages as $languageId => $courseValue) {
|
||||||
// Les pages
|
// Les pages
|
||||||
$filePath = self::DATA_DIR . $languageId . '/page.json';
|
$filePath = self::DATA_DIR . $languageId . '/page.json';
|
||||||
|
if (file_exists($filePath) === true) {
|
||||||
$jsonContent = file_get_contents($filePath);
|
$jsonContent = file_get_contents($filePath);
|
||||||
$updatedJsonContent = str_replace('"group":', '"role":', $jsonContent);
|
$updatedJsonContent = str_replace('"group":', '"role":', $jsonContent);
|
||||||
if ($updatedJsonContent !== $jsonContent) {
|
if ($updatedJsonContent !== $jsonContent) {
|
||||||
file_put_contents($filePath, $updatedJsonContent);
|
file_put_contents($filePath, $updatedJsonContent);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Les modules
|
// Les modules
|
||||||
$filePath = self::DATA_DIR . $languageId . '/module.json';
|
$filePath = self::DATA_DIR . $languageId . '/module.json';
|
||||||
|
if (file_exists($filePath) === true) {
|
||||||
$jsonContent = file_get_contents($filePath);
|
$jsonContent = file_get_contents($filePath);
|
||||||
$updatedJsonContent = str_replace('"group":', '"role":', $jsonContent);
|
$updatedJsonContent = str_replace('"group":', '"role":', $jsonContent);
|
||||||
if ($updatedJsonContent !== $jsonContent) {
|
if ($updatedJsonContent !== $jsonContent) {
|
||||||
file_put_contents($filePath, $updatedJsonContent);
|
file_put_contents($filePath, $updatedJsonContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->setData(['core', 'dataVersion', 13600]);
|
$this->setData(['core', 'dataVersion', 13600]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user