Liste des chemins d'accès

This commit is contained in:
Fred Tempez 2023-05-11 18:46:46 +02:00
parent c57b0e26e5
commit 06d5b30544
3 changed files with 11 additions and 5 deletions

View File

@ -578,7 +578,8 @@ class user extends common
self::$sharePath = $this->getSubdirectories('./site/file/source');
self::$sharePath = array_flip(self::$sharePath);
self::$sharePath = array_merge(['./site/file/source/' => '/'], self::$sharePath);
self::$sharePath = array_merge(['./site/file/source/' => 'Accès total'], self::$sharePath);
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
// Valeurs en sortie;
$this->addOutput([
@ -639,6 +640,11 @@ class user extends common
]);
}
self::$sharePath = $this->getSubdirectories('./site/file/source');
self::$sharePath = array_flip(self::$sharePath);
self::$sharePath = array_merge(['./site/file/source/' => 'Accès total'], self::$sharePath);
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
// Valeurs en sortie;
$this->addOutput([
'title' => "Ajouter un profil",
@ -1021,7 +1027,7 @@ class user extends common
/**
* Liste les dossier contenus dans RFM
*/
function getSubdirectories($dir, $basePath = '')
private function getSubdirectories($dir, $basePath = '')
{
$subdirs = array();
// Ouvrez le répertoire spécifié
@ -1037,7 +1043,7 @@ class user extends common
// Vérifiez si c'est un répertoire
if (is_dir($path)) {
// Construisez la clé et la valeur pour le tableau associatif
$key = $basePath . '/' . $file;
$key = $basePath === '' ? $file : $basePath . '/' . $file;
$value = $path . '/';
// Ajouter la clé et la valeur au tableau associatif
$subdirs[$key] = $value;

View File

@ -52,7 +52,7 @@
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilAddFileManager', true, 'Activé'); ?>
<?php echo template::checkbox('profilAddFileManager', true, 'Autorisé'); ?>
</div>
<div class="col6">
<?php echo template::select('profilAddPath', $module::$sharePath, [

View File

@ -52,7 +52,7 @@
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilEditFileManager', true, 'Activé', [
<?php echo template::checkbox('profilEditFileManager', true, 'Autorisé', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'filemanager'])
]); ?>
</div>