From f263ccccb13a5d511862919fcd7295f4856d5aaa Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 14 Sep 2010 17:03:12 +0000 Subject: [PATCH] - disabling of delete and mail icon did not work for files/folders with quotes in the name - mail icon was not disabled, if user has no run rights for FMail --- filemanager/inc/class.filemanager_ui.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index 0796fcf176..16f9bdec02 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -646,13 +646,15 @@ class filemanager_ui { $dir_is_writable[$dir] = egw_vfs::is_writable($dir); } + $path_quoted = str_replace(array('"',"'"),array('"',"\\'"),$path); if (!$dir_is_writable[$dir]) { - $readonlys["delete[$path]"] = true; // no rights to delete the file + $readonlys["delete[$path_quoted]"] = true; // no rights to delete the file } - if (egw_vfs::is_dir($path) || !egw_vfs::is_readable($path)) + if (egw_vfs::is_dir($path) || !egw_vfs::is_readable($path) || + !$GLOBALS['egw_info']['user']['apps']['felamimail']) { - $readonlys["mail[$path]"] = true; + $readonlys["mail[$path_quoted]"] = true; } } // query comments and cf's for the displayed rows