aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-04-28 20:59:53 +0200
committerMax Kostikov <max@kostikov.co>2019-04-28 20:59:53 +0200
commit0cecfceb14083141da389b7cc1e413ba5d5ca6d7 (patch)
tree018e6b20a459f2eec771e89db3b758656b3f25ee /include/items.php
parentd3ce91bd8928b55d9be501d3cf140b3f5e6a7e91 (diff)
parent405e07f0a232445e179e2df821e77007f3b6d33d (diff)
downloadvolse-hubzilla-0cecfceb14083141da389b7cc1e413ba5d5ca6d7.tar.gz
volse-hubzilla-0cecfceb14083141da389b7cc1e413ba5d5ca6d7.tar.bz2
volse-hubzilla-0cecfceb14083141da389b7cc1e413ba5d5ca6d7.zip
Merge branch 'sql_fixes' into 'dev'
possible sql performance improvement See merge request hubzilla/core!1611
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index c08deb3a0..95b696034 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4278,7 +4278,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
if($arr['mid'])
$sql_options .= " and parent_mid = '" . dbesc($arr['mid']) . "' ";
- $sql_extra = " AND item.parent IN ( SELECT parent FROM item WHERE item_thread_top = 1 $sql_options $item_normal ) ";
+ $sql_extra = " AND item.parent IN ( SELECT parent FROM item WHERE $item_uids and item_thread_top = 1 $sql_options $item_normal ) ";
if($arr['since_id'])
$sql_extra .= " and item.id > " . $since_id . " ";