Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tinyfilemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
// 'host' => show path on the host
$path_display_mode = 'full';

// user specific path display mode when viewing file information
// array('Username' => 'relative', 'Username2' => 'full', ...)
$path_display_mode_users = array();

// Allowed file extensions for create and rename files
// e.g. 'txt,html,css,js'
$allowed_file_extensions = '';
Expand Down Expand Up @@ -412,6 +416,10 @@ function getClientIP()
$root_path = isset($directories_users[$_SESSION[FM_SESSION_ID]['logged']]) ? $directories_users[$_SESSION[FM_SESSION_ID]['logged']] : $root_path;
}

// update path display mode
if ($use_auth && isset($_SESSION[FM_SESSION_ID]['logged'])) {
$path_display_mode = isset($path_display_mode_users[$_SESSION[FM_SESSION_ID]['logged']]) ? $path_display_mode_users[$_SESSION[FM_SESSION_ID]['logged']] : $path_display_mode;
}
// clean and check $root_path
$root_path = rtrim($root_path, '\\/');
$root_path = str_replace('\\', '/', $root_path);
Expand Down