diff options
author | Mario <mario@mariovavti.com> | 2022-01-20 10:29:52 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-01-20 10:29:52 +0000 |
commit | e9278c03c170f09da84df73326e864833d356fa5 (patch) | |
tree | 3a82aedcb20fa124dafff44c1cd88c60ff0e318b | |
parent | 717a547c4044647794de7eeee36c7cbf52308ec3 (diff) | |
parent | ae1fe83784f0fbe8a4ef71239631ae7a04b74e66 (diff) | |
download | volse-hubzilla-e9278c03c170f09da84df73326e864833d356fa5.tar.gz volse-hubzilla-e9278c03c170f09da84df73326e864833d356fa5.tar.bz2 volse-hubzilla-e9278c03c170f09da84df73326e864833d356fa5.zip |
Merge branch 'dev' into 7.0RC
-rw-r--r-- | Zotlabs/Module/Hq.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php index 3b8e88488..29b0df739 100644 --- a/Zotlabs/Module/Hq.php +++ b/Zotlabs/Module/Hq.php @@ -42,6 +42,9 @@ class Hq extends \Zotlabs\Web\Controller { $item_normal = item_normal(); $item_normal_update = item_normal_update(); + $sys = get_sys_channel(); + $sys_item = false; + $sql_extra = ''; if(! $item_hash) { $r = q("SELECT mid FROM item @@ -77,11 +80,6 @@ class Hq extends \Zotlabs\Web\Controller { if($update && $_SESSION['loadtime']) $simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) "; - $sys = get_sys_channel(); - $sql_extra = item_permissions_sql($sys['channel_id']); - - $sys_item = false; - } if(! $update) { @@ -183,6 +181,7 @@ class Hq extends \Zotlabs\Web\Controller { if(!$r) { $sys_item = true; + $sql_extra = item_permissions_sql($sys['channel_id']); $r = q("SELECT item.id AS item_id FROM item LEFT JOIN abook ON item.author_xchan = abook.abook_xchan @@ -209,6 +208,7 @@ class Hq extends \Zotlabs\Web\Controller { if(!$r) { $sys_item = true; + $sql_extra = item_permissions_sql($sys['channel_id']); $r = q("SELECT item.parent AS item_id FROM item LEFT JOIN abook ON item.author_xchan = abook.abook_xchan @@ -227,7 +227,7 @@ class Hq extends \Zotlabs\Web\Controller { if($r) { $items = q("SELECT item.*, item.id AS item_id FROM item - WHERE parent = '%s' $item_normal ", + WHERE parent = '%s' $item_normal $sql_extra", dbesc($r[0]['item_id']) ); |