diff --git a/core/class/helper.class.php b/core/class/helper.class.php index ae3fd0bb..562d3897 100755 --- a/core/class/helper.class.php +++ b/core/class/helper.class.php @@ -164,23 +164,6 @@ class helper { return($modules); } - - /** - * Scanne le contenu d'un dossier et de ses sous-dossiers - * @param string $dir Dossier à scanner - * @return array liste de dossiers contenus dans le répertoire cible. - */ - public static function scanSubDir($dir) { - $dirContent = []; - $iterator = new DirectoryIterator($dir); - foreach($iterator as $fileInfos) { - if($fileInfos->isDot() === false AND $fileInfos->isDir()) { - $dirContent[] = $dir . '/' . $fileInfos->getBasename(); - $dirContent = array_merge($dirContent, self::scanSubDir($dir . '/' . $fileInfos->getBasename())); - } - } - return $dirContent; - } /** diff --git a/core/core.php b/core/core.php index 7246dac0..d21b9ccf 100755 --- a/core/core.php +++ b/core/core.php @@ -44,7 +44,7 @@ class common { const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '10.4.01'; + const ZWII_VERSION = '10.4.02.modules'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 7156931c..e8526b7c 100755 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -324,7 +324,7 @@ class gallery extends common { // Valeurs en sortie $this->addOutput([ 'display' => self::DISPLAY_JSON, - 'content' => helper::scanSubDir(self::FILE_DIR.'source') + 'content' => galleriesHelper::scanDir(self::FILE_DIR.'source') ]); } @@ -673,4 +673,24 @@ class gallery extends common { ]); } +} + +class galleriesHelper extends helper { + + /** + * Scan le contenu d'un dossier et de ses sous-dossiers + * @param string $dir Dossier à scanner + * @return array + */ + public static function scanDir($dir) { + $dirContent = []; + $iterator = new DirectoryIterator($dir); + foreach($iterator as $fileInfos) { + if($fileInfos->isDot() === false AND $fileInfos->isDir()) { + $dirContent[] = $dir . '/' . $fileInfos->getBasename(); + $dirContent = array_merge($dirContent, self::scanDir($dir . '/' . $fileInfos->getBasename())); + } + } + return $dirContent; + } } \ No newline at end of file