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(); }