aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-08-15 16:28:06 -0700
committerzotlabs <mike@macgirvin.com>2019-08-15 16:28:06 -0700
commitbeeafc6bc5eb1d564a60986bbc2de3f7b06bfdc1 (patch)
treec65244157a35c7ef99febfa5a27ad037a27cd8cb /Zotlabs/Storage
parent6f8c977e73d4d8a74371c8da4d5763d1e401d62e (diff)
downloadvolse-hubzilla-beeafc6bc5eb1d564a60986bbc2de3f7b06bfdc1.tar.gz
volse-hubzilla-beeafc6bc5eb1d564a60986bbc2de3f7b06bfdc1.tar.bz2
volse-hubzilla-beeafc6bc5eb1d564a60986bbc2de3f7b06bfdc1.zip
fix bitrot in util/zotsh
Diffstat (limited to 'Zotlabs/Storage')
-rw-r--r--Zotlabs/Storage/Directory.php9
1 files changed, 6 insertions, 3 deletions
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);
}
}
}