From 84ed2579b3c1d62c5777a6c6964ec8e9e00db418 Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Tue, 11 Jan 2022 17:15:40 +0100 Subject: [PATCH] Also Cache Dir List --- index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.php b/index.php index c0443ed..35c293f 100644 --- a/index.php +++ b/index.php @@ -37,6 +37,7 @@ if (isset($_SESSION[$dir]) && !isset($_GET['refcache'])) { $files = $_SESSION[$dir]['f']; + $dirs = $_SESSION[$dir]['d']; } else { $r_imagedir = realpath($imagedir.$dir); if ($r_imagedir === false || strpos(Helpers::end_dir($r_imagedir), $r_basedir.DIRECTORY_SEPARATOR) !== 0) { @@ -53,6 +54,7 @@ if (isset($_SESSION[$dir]) $rmdirs[] = '..'; $files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs); $_SESSION[$dir]['f'] = $files; + $_SESSION[$dir]['d'] = $dirs; $_SESSION[$dir]['t'] = time(); }