diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-06-07 21:58:09 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-06-07 21:58:09 +0200 |
commit | d3bc50e18d77d0f21b2b34560338c2ded4ae59eb (patch) | |
tree | b3c9d17d190de4b9245566365d43794175c6c4b0 /Zotlabs | |
parent | ad4e8fd7f5638dfda9fe503fe58bced053f51f2a (diff) | |
download | volse-hubzilla-d3bc50e18d77d0f21b2b34560338c2ded4ae59eb.tar.gz volse-hubzilla-d3bc50e18d77d0f21b2b34560338c2ded4ae59eb.tar.bz2 volse-hubzilla-d3bc50e18d77d0f21b2b34560338c2ded4ae59eb.zip |
do not query for parents if $conv and $nouveau are set
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Network.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 6a24b9453..9837d35a3 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -392,9 +392,15 @@ class Network extends \Zotlabs\Web\Controller { if($conv) { $item_thread_top = ''; - $sql_extra .= sprintf(" AND parent IN (SELECT distinct(parent) from item where ( author_xchan = '%s' or item_mentionsme = 1 )) ", - dbesc(protect_sprintf($channel['channel_hash'])) - ); + + if($nouveau) { + $sql_extra .= " AND author_xchan = '" . dbesc($channel['channel_hash']) . "' "; + } + else { + $sql_extra .= sprintf(" AND parent IN (SELECT distinct(parent) from item where ( author_xchan = '%s' or item_mentionsme = 1 )) ", + dbesc(protect_sprintf($channel['channel_hash'])) + ); + } } if($update && ! $load) { @@ -489,9 +495,9 @@ class Network extends \Zotlabs\Web\Controller { // Normal conversation view if($order === 'post') - $ordering = "created"; + $ordering = "created"; else - $ordering = "commented"; + $ordering = "commented"; if($load) { // Fetch a page full of parent items for this page |