From 3716f4e80928f160965dde6fa475e9fa3155b25a Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 18 Jun 2018 22:57:38 -0700 Subject: hiding a channel from the directory also hides them from the cloud rootdir --- Zotlabs/Storage/Directory.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Storage/Directory.php') diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index 73548fda0..642af6300 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -722,14 +722,13 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo function ChannelList(&$auth) { $ret = array(); - $r = q("SELECT channel_id, channel_address FROM channel WHERE channel_removed = 0 - AND channel_system = 0 AND (channel_pageflags & %d) = 0", + $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) ); if ($r) { foreach ($r as $rr) { - if (perm_is_allowed($rr['channel_id'], $auth->observer, 'view_storage')) { + 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); -- cgit v1.2.3