From 88dbc8d28e5f6cdbc6537e3ec5e2c683d744a328 Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Tue, 11 Jan 2022 20:10:23 +0100 Subject: [PATCH] Add Directory Breadcrumbs --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 18fd85a..0e2e7f7 100644 --- a/index.php +++ b/index.php @@ -117,9 +117,10 @@ if (!empty($curfiles)| !empty($dirs)) { $data['images'][] = $tmp; } } - if (!empty($d)) { + if (!empty($dir)) { + $tmpdirs = array_filter(explode(DIRECTORY_SEPARATOR, $dir)); $tmppath = ''; - foreach($d as $tmpdir) { + foreach($tmpdirs as $tmpdir) { $tmppath=$tmppath.DIRECTORY_SEPARATOR.$tmpdir; $data['crumbs'][$tmpdir] = $tmppath; }