Bug sélection de langue

This commit is contained in:
fredtempez 2021-01-13 10:30:30 +01:00
parent babf10f4bf
commit 384ac6052f
1 changed files with 2 additions and 3 deletions

View File

@ -154,7 +154,6 @@ class common {
]; ];
// Langue courante // Langue courante
public static $i18nSite; public static $i18nSite;
public static $i18nCurrent;
public static $timezone; public static $timezone;
private $url = ''; private $url = '';
// Données de site // Données de site
@ -208,7 +207,7 @@ class common {
// Constructeur JsonDB // Constructeur JsonDB
$this->dataFiles[$keys] = new \Prowebcraft\JsonDb([ $this->dataFiles[$keys] = new \Prowebcraft\JsonDb([
'name' => $keys . '.json', 'name' => $keys . '.json',
'dir' => $this->dataPath ($keys,self::$i18nCurrent), 'dir' => $this->dataPath ($keys,self::$i18nSite),
'backup' => file_exists('site/data/.backup') 'backup' => file_exists('site/data/.backup')
]);; ]);;
} }
@ -229,7 +228,7 @@ class common {
// Installation fraîche, initialisation des modules manquants // Installation fraîche, initialisation des modules manquants
// La langue d'installation par défaut est fr // La langue d'installation par défaut est fr
foreach ($this->dataFiles as $stageId => $item) { foreach ($this->dataFiles as $stageId => $item) {
$folder = $this->dataPath ($stageId, self::$i18nCurrent); $folder = $this->dataPath ($stageId, self::$i18nSite);
if (file_exists($folder . $stageId .'.json') === false) { if (file_exists($folder . $stageId .'.json') === false) {
$this->initData($stageId,self::$i18nSite); $this->initData($stageId,self::$i18nSite);
common::$coreNotices [] = $stageId ; common::$coreNotices [] = $stageId ;