From 8b39e98fc3b57e2cd03e774c9d65c746dfee03e9 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 21 Jun 2011 11:09:47 +0000 Subject: [PATCH] 2011-06-21 Sergio Martin * include/functions_filemanager.php: Sended from file manager form relative path and hash to keep the path position in file collections git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4475 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/functions_filemanager.php | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 0d9cc6cb9d..c6cb731950 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-06-21 Sergio Martin + + * include/functions_filemanager.php: Sended from file manager + form relative path and hash to keep the path position in + file collections + 2011-06-20 Sancho Lerena * net_tools diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index 2ea01199fb..862e63ab6d 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -601,6 +601,15 @@ function filemanager_file_explorer($real_directory, $relative_directory, $url, $ $data[4] .= html_print_input_hidden ('filename', $fileinfo['realpath'], true); $data[4] .= html_print_input_hidden('hash', md5($fileinfo['realpath'] . $config['dbpass']), true); $data[4] .= html_print_input_hidden ('delete_file', 1, true); + + $relative_dir = str_replace($config['homedir'], '', dirname($fileinfo['realpath'])); + if ($relative_dir[0] == '/') { + $relative_dir = substr($relative_dir, 1); + } + $hash2 = md5($relative_dir . $config['dbpass']); + + $data[4] .= html_print_input_hidden ('directory', $relative_dir, true); + $data[4] .= html_print_input_hidden ('hash2', $hash2, true); $data[4] .= ''; if (($editor) && (!$readOnly)) {