do not query for parents if $conv and $nouveau are set
This commit is contained in:
parent
ad4e8fd7f5
commit
d3bc50e18d
@ -392,9 +392,15 @@ class Network extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
if($conv) {
|
if($conv) {
|
||||||
$item_thread_top = '';
|
$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) {
|
if($update && ! $load) {
|
||||||
@ -489,9 +495,9 @@ class Network extends \Zotlabs\Web\Controller {
|
|||||||
// Normal conversation view
|
// Normal conversation view
|
||||||
|
|
||||||
if($order === 'post')
|
if($order === 'post')
|
||||||
$ordering = "created";
|
$ordering = "created";
|
||||||
else
|
else
|
||||||
$ordering = "commented";
|
$ordering = "commented";
|
||||||
|
|
||||||
if($load) {
|
if($load) {
|
||||||
// Fetch a page full of parent items for this page
|
// Fetch a page full of parent items for this page
|
||||||
|
Reference in New Issue
Block a user