aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-12-15 08:51:05 +0100
committerMario Vavti <mario@mariovavti.com>2017-12-15 08:51:05 +0100
commit5c5fc0a62f892f20c2a5a21acf2932ef6a327ad7 (patch)
treea53a42aa1eab97b201562eb268d2cedb09c6f4cc
parent26b92c85641f0c4c4bda683456106c4ad21caa86 (diff)
downloadvolse-hubzilla-5c5fc0a62f892f20c2a5a21acf2932ef6a327ad7.tar.gz
volse-hubzilla-5c5fc0a62f892f20c2a5a21acf2932ef6a327ad7.tar.bz2
volse-hubzilla-5c5fc0a62f892f20c2a5a21acf2932ef6a327ad7.zip
only use effective uid if we deal with sys channel content
-rw-r--r--Zotlabs/Module/Hq.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index 073b67b92..1e46a6353 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -98,6 +98,8 @@ class Hq extends \Zotlabs\Web\Controller {
$sys = get_sys_channel();
$sql_extra = item_permissions_sql($sys['channel_id']);
+ $sys_item = false;
+
}
if(! $update) {
@@ -215,6 +217,8 @@ class Hq extends \Zotlabs\Web\Controller {
}
if(!$r) {
+ $sys_item = true;
+
$r = q("SELECT item.id AS item_id FROM item
LEFT JOIN abook ON item.author_xchan = abook.abook_xchan
WHERE mid = '%s' AND item.uid = %d $item_normal
@@ -243,6 +247,8 @@ class Hq extends \Zotlabs\Web\Controller {
}
if(!$r) {
+ $sys_item = true;
+
$r = q("SELECT item.parent AS item_id FROM item
LEFT JOIN abook ON item.author_xchan = abook.abook_xchan
WHERE mid = '%s' AND item.uid = %d $item_normal_update $simple_update
@@ -268,7 +274,7 @@ class Hq extends \Zotlabs\Web\Controller {
dbesc($parents_str)
);
- xchan_query($items,true,local_channel());
+ xchan_query($items,true,(($sys_item) ? local_channel() : 0));
$items = fetch_post_tags($items,true);
$items = conv_sort($items,'created');
}