Also Cache Dir List
This commit is contained in:
parent
823b330b99
commit
84ed2579b3
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,7 @@ if (isset($_SESSION[$dir])
|
||||||
&& !isset($_GET['refcache']))
|
&& !isset($_GET['refcache']))
|
||||||
{
|
{
|
||||||
$files = $_SESSION[$dir]['f'];
|
$files = $_SESSION[$dir]['f'];
|
||||||
|
$dirs = $_SESSION[$dir]['d'];
|
||||||
} else {
|
} else {
|
||||||
$r_imagedir = realpath($imagedir.$dir);
|
$r_imagedir = realpath($imagedir.$dir);
|
||||||
if ($r_imagedir === false || strpos(Helpers::end_dir($r_imagedir), $r_basedir.DIRECTORY_SEPARATOR) !== 0) {
|
if ($r_imagedir === false || strpos(Helpers::end_dir($r_imagedir), $r_basedir.DIRECTORY_SEPARATOR) !== 0) {
|
||||||
|
@ -53,6 +54,7 @@ if (isset($_SESSION[$dir])
|
||||||
$rmdirs[] = '..';
|
$rmdirs[] = '..';
|
||||||
$files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs);
|
$files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs);
|
||||||
$_SESSION[$dir]['f'] = $files;
|
$_SESSION[$dir]['f'] = $files;
|
||||||
|
$_SESSION[$dir]['d'] = $dirs;
|
||||||
$_SESSION[$dir]['t'] = time();
|
$_SESSION[$dir]['t'] = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue