forked from ZwiiCMS-Team/ZwiiCampus
1.6.02 exclure les dossiers des espaces des cours dans le profil
This commit is contained in:
parent
fd5aabd910
commit
372db6dc3a
@ -758,6 +758,14 @@ class user extends common
|
|||||||
|
|
||||||
// Chemin vers les dossiers du gestionnaire de fichier
|
// Chemin vers les dossiers du gestionnaire de fichier
|
||||||
self::$sharePath = $this->getSubdirectories('./site/file/source');
|
self::$sharePath = $this->getSubdirectories('./site/file/source');
|
||||||
|
|
||||||
|
// Exclure les espaces des cours
|
||||||
|
foreach (array_keys($this->getData(['course'])) as $courseId) {
|
||||||
|
self::$sharePath = array_filter(self::$sharePath, function ($key) use ($courseId) {
|
||||||
|
return strpos($key, $courseId) === false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
self::$sharePath = array_flip(self::$sharePath);
|
self::$sharePath = array_flip(self::$sharePath);
|
||||||
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(['' => 'Aucun dossier'], self::$sharePath);
|
// self::$sharePath = array_merge(['' => 'Aucun dossier'], self::$sharePath);
|
||||||
@ -950,6 +958,14 @@ class user extends common
|
|||||||
|
|
||||||
// Chemin vers les dossiers du gestionnaire de fichier
|
// Chemin vers les dossiers du gestionnaire de fichier
|
||||||
self::$sharePath = $this->getSubdirectories('./site/file/source');
|
self::$sharePath = $this->getSubdirectories('./site/file/source');
|
||||||
|
|
||||||
|
// Exclure les espaces des cours
|
||||||
|
foreach (array_keys($this->getData(['course'])) as $courseId) {
|
||||||
|
self::$sharePath = array_filter(self::$sharePath, function ($key) use ($courseId) {
|
||||||
|
return strpos($key, $courseId) === false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
self::$sharePath = array_flip(self::$sharePath);
|
self::$sharePath = array_flip(self::$sharePath);
|
||||||
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(['' => 'Aucun dossier'], self::$sharePath);
|
//self::$sharePath = array_merge(['' => 'Aucun dossier'], self::$sharePath);
|
||||||
|
Loading…
Reference in New Issue
Block a user