Choix de la langue de l'interface au niveau de l'ulisateur et pas de la config
This commit is contained in:
parent
2ca1a81879
commit
ee4d06413c
@ -302,19 +302,15 @@ class common
|
||||
$this->input['_COOKIE'] = $_COOKIE;
|
||||
}
|
||||
|
||||
// Lire la langue de l'UI sans passer par les méthodes
|
||||
$t = json_decode(file_get_contents('site/data/config.json'), true);
|
||||
self::$i18nUI = $t['config']['i18n']['interface'];
|
||||
|
||||
// Déterminer la langue du contenu du site
|
||||
if (isset($this->input['_COOKIE']['ZWII_CONTENT'])) {
|
||||
// Déterminé par le cookie
|
||||
self::$i18nContent = $this->input['_COOKIE']['ZWII_CONTENT'];
|
||||
\setlocale(LC_TIME, self::$i18nContent . '.UTF8');
|
||||
} else {
|
||||
// Absence du cookie, la langue par défaut est celle de l'interface.
|
||||
self::$i18nContent = (isset(self::$i18nUI)) ? self::$i18nUI : 'fr_FR';
|
||||
\setlocale(LC_TIME, self::$i18nUI . '.UTF8');
|
||||
// Absence du cookie, la langue par défaut est fr
|
||||
self::$i18nContent = 'fr_FR';
|
||||
\setlocale(LC_TIME, self::$i18nContent . '.UTF8');
|
||||
}
|
||||
|
||||
// Instanciation de la classe des entrées / sorties
|
||||
@ -342,11 +338,10 @@ class common
|
||||
}
|
||||
|
||||
// Langue de l'administration
|
||||
self::$i18nUI = $this->getData(['config', 'i18n', 'interface']);
|
||||
self::$i18nUI = $this->getData(['user', $this->getUser('id'), 'language']);
|
||||
// La langue par défaut du contenu est celle du site si le cookie est absent.
|
||||
self::$i18nUI = (empty(self::$i18nUI) || is_null(self::$i18nUI)) ? self::$i18nUI = 'fr_FR' : self::$i18nUI;
|
||||
|
||||
|
||||
// Le fichier existe-t-il ?
|
||||
if (!file_exists(self::I18N_DIR . self::$i18nUI . '.json')) {
|
||||
self::$i18nUI = 'fr_FR';
|
||||
@ -1590,7 +1585,7 @@ class common
|
||||
$this->getData(['user', $this->getUser('id'), 'files']) === true
|
||||
) {
|
||||
$items .= '<wbr>' . template::ico('folder', [
|
||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['config', 'i18n', 'interface']),
|
||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']),
|
||||
'margin' => 'all',
|
||||
'attr' => 'data-lity',
|
||||
'help' => 'Fichiers du site'
|
||||
@ -1724,7 +1719,7 @@ class common
|
||||
$this->getData(['user', $this->getUser('id'), 'files']) === true
|
||||
) {
|
||||
$itemsRight .= '<li>' . template::ico('folder', [
|
||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['config', 'i18n', 'interface']),
|
||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']),
|
||||
'attr' => 'data-lity',
|
||||
'help' => 'Fichiers du site'
|
||||
]) . '</li>';
|
||||
@ -2170,7 +2165,7 @@ class common
|
||||
// Items de droite
|
||||
$rightItems = '';
|
||||
if ($this->getUser('group') >= self::GROUP_MODERATOR) {
|
||||
$rightItems .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['config', 'i18n', 'interface']) . '" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a></li>';
|
||||
$rightItems .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']) . '" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a></li>';
|
||||
}
|
||||
if ($this->getUser('group') >= self::GROUP_ADMIN) {
|
||||
$rightItems .= '<li>' . template::ico('brush', [
|
||||
|
@ -919,7 +919,8 @@ if ($this->getData(['core', 'dataVersion']) < 12000) {
|
||||
$this->copyDir('core/module/install/ressource/i18n', self::I18N_DIR);
|
||||
}
|
||||
// Langue de l'interface
|
||||
$this->setData(['config', 'i18n', 'interface', 'fr_FR']);
|
||||
$this->deleteData(['config', 'i18n']);
|
||||
$this->setData(['user', $this->getUser('id'), 'language', 'fr_FR']);
|
||||
// Mise à jour
|
||||
$this->setData(['core', 'dataVersion', 12000]);
|
||||
}
|
||||
|
@ -495,9 +495,6 @@ class config extends common
|
||||
'captchaType' => $this->getInput('connectCaptchaType'),
|
||||
'showPassword' => $this->getInput('connectShowPassword', helper::FILTER_BOOLEAN),
|
||||
'redirectLogin' => $this->getInput('connectRedirectLogin', helper::FILTER_BOOLEAN)
|
||||
],
|
||||
'i18n' => [
|
||||
'interface' => $this->getData(['config', 'i18n', 'interface'])
|
||||
]
|
||||
]
|
||||
]);
|
||||
|
@ -59,7 +59,6 @@ class install extends common
|
||||
self::$i18nUI = $this->getInput('installLanguage');
|
||||
// Par défaut la langue du contenu est celle du site
|
||||
self::$i18nContent = self::$i18nUI;
|
||||
$this->setData(['config', 'i18n', 'interface', self::$i18nUI]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'install/postinstall'
|
||||
|
@ -40,9 +40,6 @@ class init extends common {
|
||||
'autoDisconnect' => true,
|
||||
'showPassword' => true,
|
||||
'redirectLogin' => true
|
||||
],
|
||||
'i18n' => [
|
||||
'interface' => 'fr_FR'
|
||||
]
|
||||
],
|
||||
'core' => [
|
||||
|
@ -5,8 +5,7 @@
|
||||
<div class="row">
|
||||
<div class="col6 offset3">
|
||||
<?php echo template::select('installLanguage', $module::$i18nFiles, [
|
||||
'label' => 'Langues installées',
|
||||
'selected' => $this->getData(['config', 'i18n', 'interface'])
|
||||
'label' => 'Langues installées'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -80,7 +80,6 @@ class translate extends common
|
||||
$success = ($this->copyDir(self::DATA_DIR . $copyFrom . '/content', self::DATA_DIR . $toCreate . '/content') === true && $success === true) ? true : false;
|
||||
// Enregistrer la langue
|
||||
if ($success) {
|
||||
$this->setData(['config', 'i18n', $toCreate, 'site']);
|
||||
$notification = sprintf(helper::translate('Données %s copiées vers %s'), self::$languages[$copyFrom], self::$languages[$toCreate]);
|
||||
} else {
|
||||
$notification = helper::translate('Erreur de copie, vérifiez les permissions');
|
||||
@ -122,23 +121,6 @@ class translate extends common
|
||||
public function index()
|
||||
{
|
||||
|
||||
// Soumission du formulaire
|
||||
// Jeton incorrect ou URl avec le code langue incorrecte
|
||||
if (
|
||||
$this->getUrl(3) === $_SESSION['csrf']
|
||||
|| array_key_exists($this->getUrl(2), self::$languages)
|
||||
) {
|
||||
|
||||
// Sauvegarder les langues de contenu
|
||||
$this->setData(['config', 'i18n', 'interface', $this->getUrl(2)]);
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'translate',
|
||||
'notification' => helper::translate('Modifications enregistrées'),
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
|
||||
// Préparation du formulaire
|
||||
// -------------------------
|
||||
@ -193,14 +175,7 @@ class translate extends common
|
||||
'value' => template::ico('pencil'),
|
||||
'help' => 'Éditer',
|
||||
'disabled' => 'fr_FR' === $selected
|
||||
]),
|
||||
template::button('translateContentLanguageEnable' . $file, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/index/' . $selected . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('check'),
|
||||
'help' => 'Activer',
|
||||
'class' => 'buttonGreen',
|
||||
'disabled' => self::$i18nUI === $selected
|
||||
]),
|
||||
])
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -329,9 +304,6 @@ class translate extends common
|
||||
file_put_contents(self::DATA_DIR . $this->getUrl(2) . '/locale.json', json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT), LOCK_EX);
|
||||
}
|
||||
|
||||
// Sauvegarde la langue de l'UI
|
||||
$this->setData(['config', 'i18n', 'interface', $this->getInput('translateUI', null)]);
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(),
|
||||
|
@ -49,7 +49,7 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php if ($module::$languagesUiInstalled) : ?>
|
||||
<?php echo template::table([2, 1, 1, 6, 1, 1], $module::$languagesUiInstalled, ['Langues', '', '', '', '', '']); ?>
|
||||
<?php echo template::table([3, 1, 1, 6, 1], $module::$languagesUiInstalled, ['Langues', '', '', '', '']); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -48,6 +48,8 @@ class user extends common
|
||||
':' => ':'
|
||||
];
|
||||
|
||||
public static $languagesInstalled = [];
|
||||
|
||||
/**
|
||||
* Ajout
|
||||
*/
|
||||
@ -90,7 +92,8 @@ class user extends common
|
||||
"accessUrl" => null,
|
||||
"accessTimer" => null,
|
||||
"accessCsrf" => null,
|
||||
"files" => $this->getInput('userAddFiles', helper::FILTER_BOOLEAN)
|
||||
"files" => $this->getInput('userAddFiles', helper::FILTER_BOOLEAN),
|
||||
'language' => $this->getInput('userEditLanguage', helper::FILTER_STRING_SHORT),
|
||||
]
|
||||
]);
|
||||
|
||||
@ -114,6 +117,19 @@ class user extends common
|
||||
'state' => $sent === true ? true : null
|
||||
]);
|
||||
}
|
||||
// Langues disponibles pour l'interface de l'utilisateur
|
||||
if (is_dir(self::I18N_DIR)) {
|
||||
$dir = getcwd();
|
||||
chdir(self::I18N_DIR);
|
||||
$files = glob('*.json');
|
||||
chdir($dir);
|
||||
}
|
||||
foreach ($files as $file) {
|
||||
// La langue est-elle référencée ?
|
||||
if (array_key_exists(basename($file, '.json'), self::$languages)) {
|
||||
self::$languagesInstalled[basename($file, '.json')] = self::$languages[basename($file, '.json')];
|
||||
}
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => helper::translate('Nouvel utilisateur'),
|
||||
@ -172,9 +188,9 @@ class user extends common
|
||||
public function edit()
|
||||
{
|
||||
if (
|
||||
$this->getUrl(3) !== $_SESSION['csrf'] &&
|
||||
$this->getUrl(4) !== $_SESSION['csrf']
|
||||
$this->getUrl(3) !== $_SESSION['csrf']
|
||||
) {
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'user',
|
||||
@ -259,7 +275,8 @@ class user extends common
|
||||
'accessUrl' => $this->getData(['user', $this->getUrl(2), 'accessUrl']),
|
||||
'accessTimer' => $this->getData(['user', $this->getUrl(2), 'accessTimer']),
|
||||
'accessCsrf' => $this->getData(['user', $this->getUrl(2), 'accessCsrf']),
|
||||
'files' => $this->getInput('userEditFiles', helper::FILTER_BOOLEAN)
|
||||
'files' => $this->getInput('userEditFiles', helper::FILTER_BOOLEAN),
|
||||
'language' => $this->getInput('userEditLanguage', helper::FILTER_STRING_SHORT),
|
||||
]
|
||||
]);
|
||||
// Redirection spécifique si l'utilisateur change son mot de passe
|
||||
@ -281,6 +298,20 @@ class user extends common
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
|
||||
// Langues disponibles pour l'interface de l'utilisateur
|
||||
if (is_dir(self::I18N_DIR)) {
|
||||
$dir = getcwd();
|
||||
chdir(self::I18N_DIR);
|
||||
$files = glob('*.json');
|
||||
chdir($dir);
|
||||
}
|
||||
foreach ($files as $file) {
|
||||
// La langue est-elle référencée ?
|
||||
if (array_key_exists(basename($file, '.json'), self::$languages)) {
|
||||
self::$languagesInstalled[basename($file, '.json')] = self::$languages[basename($file, '.json')];
|
||||
}
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => $this->getData(['user', $this->getUrl(2), 'firstname']) . ' ' . $this->getData(['user', $this->getUrl(2), 'lastname']),
|
||||
@ -348,7 +379,7 @@ class user extends common
|
||||
$userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']),
|
||||
self::$groups[$this->getData(['user', $userId, 'group'])],
|
||||
template::button('userEdit' . $userId, [
|
||||
'href' => helper::baseUrl() . 'user/edit/' . $userId . '/back/' . $_SESSION['csrf'],
|
||||
'href' => helper::baseUrl() . 'user/edit/' . $userId . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('pencil'),
|
||||
'help' => 'Éditer'
|
||||
]),
|
||||
@ -391,7 +422,7 @@ class user extends common
|
||||
* Aucun compte existant
|
||||
*/
|
||||
if (!$this->getData(['user', $userId])) {
|
||||
$logStatus ='Compte inconnu';
|
||||
$logStatus = 'Compte inconnu';
|
||||
//Stockage de l'IP
|
||||
$this->setData([
|
||||
'blacklist',
|
||||
@ -484,7 +515,7 @@ class user extends common
|
||||
}
|
||||
// Cas 3 le délai de bloquage court
|
||||
if ($this->getData(['user', $userId, 'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) > time()) {
|
||||
$notification = sprintf(helper::translate('Accès bloqué %d minutes', ($this->getData(['config', 'connect', 'timeout']) / 60) ));
|
||||
$notification = sprintf(helper::translate('Accès bloqué %d minutes', ($this->getData(['config', 'connect', 'timeout']) / 60)));
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
@ -526,7 +557,7 @@ class user extends common
|
||||
session_destroy();
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'notification' =>helper::translate('Déconnexion !'),
|
||||
'notification' => helper::translate('Déconnexion !'),
|
||||
'redirect' => helper::baseUrl(false),
|
||||
'state' => true
|
||||
]);
|
||||
|
@ -42,30 +42,6 @@
|
||||
'autocomplete' => 'off',
|
||||
'label' => 'Adresse mail'
|
||||
]); ?>
|
||||
<?php echo template::select('userAddGroup', self::$groupNews, [
|
||||
'label' => 'Groupe',
|
||||
'selected' => self::GROUP_MEMBER
|
||||
]); ?>
|
||||
<div id="userAddMemberFiles" class="displayNone">
|
||||
<?php echo template::checkbox('userAddFiles', true, 'Partage de fichiers autorisé', [
|
||||
'checked' => false,
|
||||
'help' => 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers'
|
||||
]); ?>
|
||||
</div>
|
||||
<div id="userAddLabelAuth">
|
||||
<?php echo helper::translate('Permissions :'); ?>
|
||||
</div>
|
||||
<ul id="userAddGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userAddGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
</ul>
|
||||
<ul id="userAddGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userAddGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de pages'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de fichiers'); ?></li>
|
||||
</ul>
|
||||
<ul id="userAddGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userAddGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Administration complète du site'); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
@ -93,4 +69,45 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4><?php echo helper::translate('Paramètres'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::select('userAddLanguage', $module::$languagesInstalled, [
|
||||
'label' => 'Langues'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::select('userAddGroup', self::$groupNews, [
|
||||
'label' => 'Groupe',
|
||||
'selected' => self::GROUP_MEMBER
|
||||
]); ?>
|
||||
<div id="userAddMemberFiles" class="displayNone">
|
||||
<?php echo template::checkbox('userAddFiles', true, 'Partage de fichiers autorisé', [
|
||||
'checked' => false,
|
||||
'help' => 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers'
|
||||
]); ?>
|
||||
</div>
|
||||
<div id="userAddLabelAuth">
|
||||
<?php echo helper::translate('Permissions :'); ?>
|
||||
</div>
|
||||
<ul id="userAddGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userAddGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
</ul>
|
||||
<ul id="userAddGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userAddGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de pages'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de fichiers'); ?></li>
|
||||
</ul>
|
||||
<ul id="userAddGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userAddGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Administration complète du site'); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -56,34 +56,6 @@
|
||||
'label' => 'Adresse mail',
|
||||
'value' => $this->getData(['user', $this->getUrl(2), 'mail'])
|
||||
]); ?>
|
||||
<?php if ($this->getUser('group') === self::GROUP_ADMIN) : ?>
|
||||
<?php echo template::select('userEditGroup', self::$groupEdits, [
|
||||
'disabled' => ($this->getUrl(2) === $this->getUser('id')),
|
||||
'help' => ($this->getUrl(2) === $this->getUser('id') ? 'Impossible de modifier votre propre groupe.' : ''),
|
||||
'label' => 'Groupe',
|
||||
'selected' => $this->getData(['user', $this->getUrl(2), 'group'])
|
||||
]); ?>
|
||||
<div id="userEditMemberFiles" class="displayNone">
|
||||
<?php echo template::checkbox('userEditFiles', true, 'Partage de fichiers autorisé', [
|
||||
'checked' => $this->getData(['user', $this->getUrl(2), 'files']),
|
||||
'help' => 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers'
|
||||
]); ?>
|
||||
</div>
|
||||
<div id="userEditLabelAuth">
|
||||
<?php echo helper::translate('Permissions :'); ?>
|
||||
</div>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userEditGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
</ul>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userEditGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de pages'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de fichiers'); ?></li>
|
||||
</ul>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userEditGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Administration complète du site'); ?></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
@ -112,4 +84,50 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4><?php echo helper::translate('Paramètres'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::select('userEditLanguage', $module::$languagesInstalled, [
|
||||
'label' => 'Langues',
|
||||
'selected' => $this->getData(['user', $this->getUrl(2), 'language'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php if ($this->getUser('group') === self::GROUP_ADMIN) : ?>
|
||||
<?php echo template::select('userEditGroup', self::$groupEdits, [
|
||||
'disabled' => ($this->getUrl(2) === $this->getUser('id')),
|
||||
'help' => ($this->getUrl(2) === $this->getUser('id') ? 'Impossible de modifier votre propre groupe.' : ''),
|
||||
'label' => 'Groupe',
|
||||
'selected' => $this->getData(['user', $this->getUrl(2), 'group'])
|
||||
]); ?>
|
||||
<div id="userEditMemberFiles" class="displayNone">
|
||||
<?php echo template::checkbox('userEditFiles', true, 'Partage de fichiers autorisé', [
|
||||
'checked' => $this->getData(['user', $this->getUrl(2), 'files']),
|
||||
'help' => 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers'
|
||||
]); ?>
|
||||
</div>
|
||||
<div id="userEditLabelAuth">
|
||||
<?php echo helper::translate('Permissions :'); ?>
|
||||
</div>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userEditGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
</ul>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userEditGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Accès aux pages privées'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de pages'); ?></li>
|
||||
<li><?php echo helper::translate('Ajout - Édition - Suppression de fichiers'); ?></li>
|
||||
</ul>
|
||||
<ul id="userEditGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userEditGroupDescription displayNone">
|
||||
<li><?php echo helper::translate('Administration complète du site'); ?></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
4
core/vendor/filemanager/config/config.php
vendored
4
core/vendor/filemanager/config/config.php
vendored
@ -13,9 +13,7 @@ ob_start('mb_output_handler');
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
|
||||
// Lire la langue installée
|
||||
$tab = json_decode(file_get_contents('../../../site/data/config.json'), true);
|
||||
$lang = $tab['config']['i18n']['interface'];
|
||||
setlocale(LC_CTYPE, $lang); //correct transliteration
|
||||
setlocale(LC_CTYPE, $_GET['lang']); //correct transliteration
|
||||
|
||||
/* Lecture du groupe de l'utilisateur connecté pour attribuer les droits et les dossiers */
|
||||
$userId = $_COOKIE['ZWII_USER_ID'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user