From 78c0926a64dcb40656a979178f9332b0845def18 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 14 Dec 2020 20:22:13 +0000 Subject: improve when to show link to parent path --- Zotlabs/Storage/Browser.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 3d99bf659..21190d1bd 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -101,18 +101,16 @@ class Browser extends DAV\Browser\Plugin { $folder_list = attach_folder_select_list($channel_id); - $parent_path = ''; - $siteroot_disabled = get_config('system', 'cloud_disable_siteroot'); + $is_root_folder = (($path === 'cloud/' . $nick) ? true : false); - // Hide parent folder if in /cloud or category view - if (($channel_id && ! $cat) || ($siteroot_disabled && $path !== 'cloud')) { + $parent_path = ''; + + if ($channel_id && ! $cat && !($siteroot_disabled && $is_root_folder)) { list($parent_uri) = \Sabre\Uri\split($path); $parent_path = \Sabre\HTTP\encodePath($this->server->getBaseUri() . $parent_uri); } - $is_root_folder = (($path === 'cloud/' . $nick) ? true : false); - $f = []; foreach ($files as $file) { -- cgit v1.2.3