diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-02-09 20:36:14 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-02-09 20:36:14 +0100 |
commit | 6cc32943954124739023751eb377d398a54772d9 (patch) | |
tree | 401e579368ad533c01032b23fdfab56dbf31e31c /Zotlabs/Module/Channel.php | |
parent | 5f229d81e9aaac0e0d82091d2d9089f5fb34bfe8 (diff) | |
download | volse-hubzilla-6cc32943954124739023751eb377d398a54772d9.tar.gz volse-hubzilla-6cc32943954124739023751eb377d398a54772d9.tar.bz2 volse-hubzilla-6cc32943954124739023751eb377d398a54772d9.zip |
finally fix channel query
Diffstat (limited to 'Zotlabs/Module/Channel.php')
-rw-r--r-- | Zotlabs/Module/Channel.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index dddca16b4..3dab85410 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -204,7 +204,7 @@ class Channel extends \Zotlabs\Web\Controller { $_SESSION['loadtime'] = datetime_convert(); } else { - $r = q("SELECT distinct parent AS item_id, created from item + $r = q("SELECT distinct parent AS item_id from item left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids ) WHERE uid = %d $item_normal_update AND item_wall = 1 $simple_update @@ -249,11 +249,11 @@ class Channel extends \Zotlabs\Web\Controller { } } else { - $r = q("SELECT DISTINCT item.parent AS item_id FROM item - left join abook on item.author_xchan = abook.abook_xchan + $r = q("SELECT item.parent AS item_id FROM item + left join abook on ( item.author_xchan = abook.abook_xchan $abook_uids ) WHERE true and uid = %d $item_normal AND (abook.abook_blocked = 0 or abook.abook_flags is null) - AND item.item_wall = 1 AND item.item_thread_top AND item.mid = item.parent_mid + AND item.item_wall = 1 AND item.item_thread_top = 1 $sql_extra $sql_extra2 ORDER BY created DESC $pager_sql ", intval(\App::$profile['profile_uid']) |