Profil Charge les dialgues des modules
This commit is contained in:
parent
27c4f4b7a6
commit
eb9132ccdd
@ -710,9 +710,27 @@ class user extends common
|
|||||||
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
|
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
|
||||||
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
|
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
|
||||||
|
|
||||||
|
// Chemin vers les dossiers du gestionnaire de fichier
|
||||||
|
self::$sharePath = $this->getSubdirectories('./site/file/source');
|
||||||
|
self::$sharePath = array_flip(self::$sharePath);
|
||||||
|
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
|
||||||
|
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
|
||||||
|
|
||||||
// Liste des modules installés
|
// Liste des modules installés
|
||||||
self::$listModules = helper::getModules();
|
self::$listModules = helper::getModules();
|
||||||
self::$listModules = array_keys(self::$listModules);
|
self::$listModules = array_keys(self::$listModules);
|
||||||
|
|
||||||
|
// Charge les dialogues du module pour afficher les traductions
|
||||||
|
foreach (self::$listModules as $moduleId) {
|
||||||
|
if (
|
||||||
|
is_dir(self::MODULE_DIR . $moduleId . '/i18n')
|
||||||
|
&& file_exists(self::MODULE_DIR . $moduleId . '/i18n/' . self::$i18nUI . '.json')
|
||||||
|
) {
|
||||||
|
$d = json_decode(file_get_contents(self::MODULE_DIR . $moduleId . '/i18n/' . self::$i18nUI . '.json'), true);
|
||||||
|
self::$dialog = array_merge(self::$dialog, $d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Tri alphabétique
|
||||||
sort(self::$listModules);
|
sort(self::$listModules);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -855,9 +873,27 @@ class user extends common
|
|||||||
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
|
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
|
||||||
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
|
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
|
||||||
|
|
||||||
|
// Chemin vers les dossiers du gestionnaire de fichier
|
||||||
|
self::$sharePath = $this->getSubdirectories('./site/file/source');
|
||||||
|
self::$sharePath = array_flip(self::$sharePath);
|
||||||
|
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
|
||||||
|
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
|
||||||
|
|
||||||
// Liste des modules installés
|
// Liste des modules installés
|
||||||
self::$listModules = helper::getModules();
|
self::$listModules = helper::getModules();
|
||||||
self::$listModules = array_keys(self::$listModules);
|
self::$listModules = array_keys(self::$listModules);
|
||||||
|
|
||||||
|
// Charge les dialogues du module pour afficher les traductions
|
||||||
|
foreach (self::$listModules as $moduleId) {
|
||||||
|
if (
|
||||||
|
is_dir(self::MODULE_DIR . $moduleId . '/i18n')
|
||||||
|
&& file_exists(self::MODULE_DIR . $moduleId . '/i18n/' . self::$i18nUI . '.json')
|
||||||
|
) {
|
||||||
|
$d = json_decode(file_get_contents(self::MODULE_DIR . $moduleId . '/i18n/' . self::$i18nUI . '.json'), true);
|
||||||
|
self::$dialog = array_merge(self::$dialog, $d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Tri alphabétique
|
||||||
sort(self::$listModules);
|
sort(self::$listModules);
|
||||||
|
|
||||||
// Valeurs en sortie;
|
// Valeurs en sortie;
|
||||||
|
Loading…
Reference in New Issue
Block a user