diff options
author | zotlabs <mike@macgirvin.com> | 2017-12-21 13:36:58 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-12-21 13:36:58 -0800 |
commit | f825e27f1af71ba873f5698cad433bc017760556 (patch) | |
tree | 6c0c55b71f1cdb6abdbe4157a43d3af3281b9560 /Zotlabs/Module/Hq.php | |
parent | c087d1e18b32f62d126cb01accbdeff21f5c1107 (diff) | |
parent | 9c72963d7ce3c60709755edb5d40cb0b06b29cda (diff) | |
download | volse-hubzilla-f825e27f1af71ba873f5698cad433bc017760556.tar.gz volse-hubzilla-f825e27f1af71ba873f5698cad433bc017760556.tar.bz2 volse-hubzilla-f825e27f1af71ba873f5698cad433bc017760556.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'Zotlabs/Module/Hq.php')
-rw-r--r-- | Zotlabs/Module/Hq.php | 8 |
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'); } |