mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-08 00:42:19 +02:00
Disable excluded extension name from viewing (#1151)
This commit is contained in:
parent
8e87afae5b
commit
ca4b1b1743
|
@ -1647,7 +1647,7 @@ if (isset($_GET['view'])) {
|
||||||
$file = $_GET['view'];
|
$file = $_GET['view'];
|
||||||
$file = fm_clean_path($file, false);
|
$file = fm_clean_path($file, false);
|
||||||
$file = str_replace('/', '', $file);
|
$file = str_replace('/', '', $file);
|
||||||
if ($file == '' || !is_file($path . '/' . $file) || in_array($file, $GLOBALS['exclude_items'])) {
|
if ($file == '' || !is_file($path . '/' . $file) || !fm_is_exclude_items($file)) {
|
||||||
fm_set_msg(lng('File not found'), 'error');
|
fm_set_msg(lng('File not found'), 'error');
|
||||||
$FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH));
|
$FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH));
|
||||||
}
|
}
|
||||||
|
@ -1846,7 +1846,7 @@ if (isset($_GET['edit']) && !FM_READONLY) {
|
||||||
$file = $_GET['edit'];
|
$file = $_GET['edit'];
|
||||||
$file = fm_clean_path($file, false);
|
$file = fm_clean_path($file, false);
|
||||||
$file = str_replace('/', '', $file);
|
$file = str_replace('/', '', $file);
|
||||||
if ($file == '' || !is_file($path . '/' . $file) || in_array($file, $GLOBALS['exclude_items'])) {
|
if ($file == '' || !is_file($path . '/' . $file) || !fm_is_exclude_items($file)) {
|
||||||
fm_set_msg(lng('File not found'), 'error');
|
fm_set_msg(lng('File not found'), 'error');
|
||||||
$FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH));
|
$FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue