From 8bb497cf7ddc5225ba13c49508f51ff4f8c974b8 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 25 Nov 2009 12:03:19 +0000 Subject: [PATCH] 2009-11-25 Miguel de Dios * include/functions_filemanager.php: fix bug that the url content "//" in cases for example install in root of www directory. Only fix in this part of source code because the rest of sources run fine. Fixes: 2903005 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2131 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/include/functions_filemanager.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 724a7b7aa5..66d637184c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2009-11-25 Miguel de Dios + + * include/functions_filemanager.php: fix bug that the url content "//" in + cases for example install in root of www directory. Only fix in this part + of source code because the rest of sources run fine. + Fixes: 2903005 + 2009-11-25 Miguel de Dios * index.php: clean source code, the blank end line in the end of document diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index e9dcfd7f51..a6b7454728 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -187,7 +187,7 @@ function get_file_manager_file_info ($filepath) { 'link' => 0, 'is_dir' => false, 'name' => basename ($realpath), - 'url' => $config['homeurl'].str_ireplace ($config['homedir'], '', $realpath), + 'url' => str_replace('//', '/', $config['homeurl'].str_ireplace ($config['homedir'], '', $realpath)), 'realpath' => $realpath, 'size' => filesize ($realpath), 'last_modified' => filemtime ($realpath)