aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-06-18 22:57:38 -0700
committerzotlabs <mike@macgirvin.com>2018-06-18 22:57:38 -0700
commit3716f4e80928f160965dde6fa475e9fa3155b25a (patch)
tree99e351ec993f3574be1eecca3aa424fe45f44168 /Zotlabs/Storage
parent6cf040d3ee2ad750ac5e3539a33f2eccecadf146 (diff)
downloadvolse-hubzilla-3716f4e80928f160965dde6fa475e9fa3155b25a.tar.gz
volse-hubzilla-3716f4e80928f160965dde6fa475e9fa3155b25a.tar.bz2
volse-hubzilla-3716f4e80928f160965dde6fa475e9fa3155b25a.zip
hiding a channel from the directory also hides them from the cloud rootdir
Diffstat (limited to 'Zotlabs/Storage')
-rw-r--r--Zotlabs/Storage/Directory.php5
1 files changed, 2 insertions, 3 deletions
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);