mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-17 21:16:38 +02:00
Hide files and folders form listing Fix - #59
This commit is contained in:
parent
ba41b79f1a
commit
1bf7621b38
|
@ -61,8 +61,8 @@ $datetime_format = 'd.m.y H:i';
|
||||||
// allowed upload file extensions
|
// allowed upload file extensions
|
||||||
$upload_extensions = ''; // 'gif,png,jpg'
|
$upload_extensions = ''; // 'gif,png,jpg'
|
||||||
|
|
||||||
//Array of folders excluded from listing
|
//Array of files and folders excluded from listing
|
||||||
$GLOBALS['exclude_folders'] = array();
|
$GLOBALS['exclude_items'] = array();
|
||||||
|
|
||||||
// include user config php file
|
// include user config php file
|
||||||
if (defined('FM_CONFIG') && is_file(FM_CONFIG)) {
|
if (defined('FM_CONFIG') && is_file(FM_CONFIG)) {
|
||||||
|
@ -672,16 +672,16 @@ $folders = array();
|
||||||
$files = array();
|
$files = array();
|
||||||
if (is_array($objects)) {
|
if (is_array($objects)) {
|
||||||
foreach ($objects as $file) {
|
foreach ($objects as $file) {
|
||||||
if ($file == '.' || $file == '..' && in_array($file, $GLOBALS['exclude_folders'])) {
|
if ($file == '.' || $file == '..' && in_array($file, $GLOBALS['exclude_items'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!FM_SHOW_HIDDEN && substr($file, 0, 1) === '.') {
|
if (!FM_SHOW_HIDDEN && substr($file, 0, 1) === '.') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$new_path = $path . '/' . $file;
|
$new_path = $path . '/' . $file;
|
||||||
if (is_file($new_path)) {
|
if (is_file($new_path) && !in_array($file, $GLOBALS['exclude_items'])) {
|
||||||
$files[] = $file;
|
$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;
|
$folders[] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1363,7 +1363,7 @@ $all_files_size = 0;
|
||||||
<a href="javascript:document.getElementById('a-copy').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-files-o"></i> Copy </a></li>
|
<a href="javascript:document.getElementById('a-copy').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-files-o"></i> Copy </a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 d-none d-sm-block"><a href="https://github.com/prasathmani/tinyfilemanager" target="_blank" class="float-right" style="color:silver">H3K | File Manager v2.1</a></div>
|
<div class="col-3 d-none d-sm-block"><a href="https://tinyfilemanager.github.io" target="_blank" class="float-right" style="color:silver">Tiny File Manager v2.1</a></div>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</form>
|
</form>
|
||||||
|
@ -2171,7 +2171,7 @@ global $lang;
|
||||||
<meta name="author" content="CCP Programmers">
|
<meta name="author" content="CCP Programmers">
|
||||||
<meta name="robots" content="noindex, nofollow">
|
<meta name="robots" content="noindex, nofollow">
|
||||||
<meta name="googlebot" content="noindex">
|
<meta name="googlebot" content="noindex">
|
||||||
<title>H3K | File Manager</title>
|
<title>H3K | Tiny File Manager</title>
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
||||||
<style>
|
<style>
|
||||||
.form-signin {
|
.form-signin {
|
||||||
|
@ -2267,7 +2267,7 @@ global $lang;
|
||||||
<meta name="author" content="CCP Programmers">
|
<meta name="author" content="CCP Programmers">
|
||||||
<meta name="robots" content="noindex, nofollow">
|
<meta name="robots" content="noindex, nofollow">
|
||||||
<meta name="googlebot" content="noindex">
|
<meta name="googlebot" content="noindex">
|
||||||
<title>H3K | File Manager</title>
|
<title>H3K | Tiny File Manager</title>
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
|
||||||
<?php if (isset($_GET['view']) && FM_USE_HIGHLIGHTJS): ?>
|
<?php if (isset($_GET['view']) && FM_USE_HIGHLIGHTJS): ?>
|
||||||
|
|
Loading…
Reference in a new issue