From 1bf7621b3894463380546b4890c1ecb2129f644a Mon Sep 17 00:00:00 2001 From: Prasath Mani Date: Thu, 18 Oct 2018 14:33:22 +0530 Subject: [PATCH] Hide files and folders form listing Fix - #59 --- tinyfilemanager.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 6584f82..ce4dbce 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -61,8 +61,8 @@ $datetime_format = 'd.m.y H:i'; // allowed upload file extensions $upload_extensions = ''; // 'gif,png,jpg' -//Array of folders excluded from listing -$GLOBALS['exclude_folders'] = array(); +//Array of files and folders excluded from listing +$GLOBALS['exclude_items'] = array(); // include user config php file if (defined('FM_CONFIG') && is_file(FM_CONFIG)) { @@ -672,16 +672,16 @@ $folders = array(); $files = array(); if (is_array($objects)) { foreach ($objects as $file) { - if ($file == '.' || $file == '..' && in_array($file, $GLOBALS['exclude_folders'])) { + if ($file == '.' || $file == '..' && in_array($file, $GLOBALS['exclude_items'])) { continue; } if (!FM_SHOW_HIDDEN && substr($file, 0, 1) === '.') { continue; } $new_path = $path . '/' . $file; - if (is_file($new_path)) { + if (is_file($new_path) && !in_array($file, $GLOBALS['exclude_items'])) { $files[] = $file; - } elseif (is_dir($new_path) && $file != '.' && $file != '..' && !in_array($file, $GLOBALS['exclude_folders'])) { + } elseif (is_dir($new_path) && $file != '.' && $file != '..' && !in_array($file, $GLOBALS['exclude_items'])) { $folders[] = $file; } } @@ -1363,7 +1363,7 @@ $all_files_size = 0; Copy -
H3K | File Manager v2.1
+
Tiny File Manager v2.1
@@ -2171,7 +2171,7 @@ global $lang; - H3K | File Manager + H3K | Tiny File Manager