Filter Unsupported Files
This commit is contained in:
parent
23251909fc
commit
aef49fb30f
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,8 @@ if (isset($_SESSION[$cdir])
|
||||||
$rmdirs[] = '.';
|
$rmdirs[] = '.';
|
||||||
$rmdirs[] = '..';
|
$rmdirs[] = '..';
|
||||||
$files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs);
|
$files = array_diff(scandir($imagedir.$dir, SCANDIR_SORT_DESCENDING), $rmdirs);
|
||||||
|
// Filter Unsupported Files
|
||||||
|
$files = array_values(preg_grep('/.*\.(?!(webm|sh)).*/i', $files));
|
||||||
$_SESSION[$cdir]['f'] = $files;
|
$_SESSION[$cdir]['f'] = $files;
|
||||||
$_SESSION[$cdir]['d'] = $dirs;
|
$_SESSION[$cdir]['d'] = $dirs;
|
||||||
$_SESSION[$cdir]['t'] = time();
|
$_SESSION[$cdir]['t'] = time();
|
||||||
|
|
Loading…
Reference in a new issue