From beeafc6bc5eb1d564a60986bbc2de3f7b06bfdc1 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 15 Aug 2019 16:28:06 -0700 Subject: fix bitrot in util/zotsh --- Zotlabs/Storage/Directory.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Storage/Directory.php') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index b30aecf92..ae36fc1c0 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -720,7 +720,11 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo * @return array Directory[] */ function ChannelList(&$auth) { - $ret = array(); + $ret = []; + + if (intval(get_config('system','cloud_disable_siteroot'))) { + return $ret; + } $r = q("SELECT channel_id, channel_address, profile.publish FROM channel left join profile on profile.uid = channel.channel_id WHERE channel_removed = 0 AND channel_system = 0 AND (channel_pageflags & %d) = 0", intval(PAGE_HIDDEN) @@ -730,8 +734,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo foreach ($r as $rr) { if (perm_is_allowed($rr['channel_id'], $auth->observer, 'view_storage') && $rr['publish']) { logger('found channel: /cloud/' . $rr['channel_address'], LOGGER_DATA); - // @todo can't we drop '/cloud'? It gets stripped off anyway in RedDirectory - $ret[] = new Directory('/cloud/' . $rr['channel_address'], $auth); + $ret[] = new Directory($rr['channel_address'], $auth); } } } -- cgit v1.2.3