From 192806dd234100e69d299cc4657b446024ee6889 Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Tue, 11 Jan 2022 16:32:12 +0100 Subject: [PATCH] Use Dir Basename --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 2a9b788..fd0030e 100644 --- a/index.php +++ b/index.php @@ -36,8 +36,9 @@ if (isset($_SESSION['files']) { $files = $_SESSION['files']; } else { - $dirs = glob($imagedir.$dir.'/*' , GLOB_ONLYDIR); - print_r($dirs); + $tmpdirs = glob(Helpers::end_dir($imagedir.$dir).'*' , GLOB_ONLYDIR); + foreach ($tmpdirs as $tmpdir): + $dirs[] = basename($tmpdir); $rmdirs = $dirs; $rmdirs[] = '.'; $rmdirs[] = '..';