From 54389ff5a5332dda2c38fed71f95552dde1d5720 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 30 Jan 2018 12:26:45 +0100 Subject: [PATCH] * Filemanager: Fix "open as new" action is disabled on selected file context menu --- filemanager/inc/class.filemanager_ui.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index 2de6ce76b7..cdcf191838 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -970,11 +970,16 @@ class filemanager_ui $row['class'] .= 'isDir '; $row['is_dir'] = 1; + if(!$dir_is_writable[$path]) + { + $row['class'] .= 'noEdit '; + } } - if(!$dir_is_writable[$path]) + elseif (!$dir_is_writable[Vfs::dirname($path)]) { $row['class'] .= 'noEdit '; } + $row['class'] .= !$dir_is_writable[$dir] ? 'noDelete' : ''; $row['download_url'] = Vfs::download_url($path); $row['gid'] = -abs($row['gid']); // gid are positive, but we use negagive account_id for groups internal