From ef371092a0b1e3d736719797f30800fe3b2008d5 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 6 Feb 2024 21:14:53 +0100 Subject: [PATCH] 1.4.22 le lien RFM de la barre ouvre le dossier de l'espace ou celui de tous les dossiers en mode home. --- core/vendor/filemanager/config/config.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/vendor/filemanager/config/config.php b/core/vendor/filemanager/config/config.php index d15262f..5b79209 100644 --- a/core/vendor/filemanager/config/config.php +++ b/core/vendor/filemanager/config/config.php @@ -45,8 +45,16 @@ if (!is_null($u) && !is_null($g) && !is_null($userId)) { $folder['delete'] = true; $folder['copycut'] = true; $folder['chmod'] = true; - $uploadDir = '/site/file/source/'; - $currentPath = '../../../site/file/source/'; + // Pointe vers le dossier du cours + if ( + isset($courseId) + && $courseId != 'home' + ) { + $uploadDir = './site/file/source/' . $courseId . '/'; + } else { + $uploadDir = '/site/file/source/'; + } + $currentPath = '../../../' . $uploadDir; break; case 2: case 1: @@ -69,7 +77,6 @@ if (!is_null($u) && !is_null($g) && !is_null($userId)) { } else { $uploadDir = $g['profil'][$group][$profil]['folder']['path']; } - $currentPath = '../../../' . $uploadDir; if (!is_dir($currentPath)) { mkdir($currentPath);