mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-08 08:52:23 +02:00
Check in file viewer and file editor
This commit is contained in:
parent
1301b27e0e
commit
f747457af5
|
@ -1650,7 +1650,10 @@ 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) || in_array($file, $GLOBALS['exclude_items']) || (
|
||||||
|
isset($exclude_items_users[$_SESSION[FM_SESSION_ID]['logged']]) &&
|
||||||
|
in_array($file, $exclude_items_users[$_SESSION[FM_SESSION_ID]['logged']]))
|
||||||
|
){
|
||||||
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));
|
||||||
}
|
}
|
||||||
|
@ -1849,7 +1852,10 @@ 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) || in_array($file, $GLOBALS['exclude_items']) || (
|
||||||
|
isset($exclude_items_users[$_SESSION[FM_SESSION_ID]['logged']]) &&
|
||||||
|
in_array($file, $exclude_items_users[$_SESSION[FM_SESSION_ID]['logged']]))
|
||||||
|
){
|
||||||
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