2023-02-10 09:58:55 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2023-02-10 10:29:00 +01:00
|
|
|
* Mise à jour à partir de la version 11.5.13
|
2023-02-10 09:58:55 +01:00
|
|
|
* */
|
|
|
|
$version = json_decode(file_get_contents('site/data/core.json'), true);
|
|
|
|
if ($version['core']['dataVersion'] < 12000) {
|
|
|
|
// Correspondance pour les dossiers de langue à convertir
|
|
|
|
$languages = [
|
|
|
|
'fr' => 'fr_FR',
|
|
|
|
'en' => 'en_EN',
|
|
|
|
'pt' => 'pt_PT'
|
|
|
|
];
|
|
|
|
// Convertit les dossiers vers la nouvelle structure
|
|
|
|
foreach ($languages as $key => $value) {
|
|
|
|
if (
|
|
|
|
is_dir('site/data/' . $key) &&
|
|
|
|
!is_dir('site/data/' . $value)
|
|
|
|
) {
|
2023-02-10 10:29:00 +01:00
|
|
|
$end = rename('site/data/' . $key, 'site/data/' . $value);
|
2023-02-10 09:58:55 +01:00
|
|
|
}
|
|
|
|
}
|
2023-02-10 10:29:00 +01:00
|
|
|
sleep(2);
|
2023-02-10 09:58:55 +01:00
|
|
|
}
|