aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-10 18:42:58 -0700
committerzotlabs <mike@macgirvin.com>2018-05-10 18:42:58 -0700
commitef6e067a45efa43eb30b4639676ed179636d2a1d (patch)
treec84a409535fd9849cf584cd5a542082df250b940 /Zotlabs/Module
parent721496f9220fa59059f90d16d3b3fb19337b2f16 (diff)
downloadvolse-hubzilla-ef6e067a45efa43eb30b4639676ed179636d2a1d.tar.gz
volse-hubzilla-ef6e067a45efa43eb30b4639676ed179636d2a1d.tar.bz2
volse-hubzilla-ef6e067a45efa43eb30b4639676ed179636d2a1d.zip
add top level posts containing the cid's url to the cid search in mod_network. We could alternatively search for mention tags here for a bit more precision but the sql could get pretty hairy with all the joins going on.
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Network.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index e97ebf1d0..2d6307eb1 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -251,7 +251,7 @@ class Network extends \Zotlabs\Web\Controller {
);
if($r) {
$item_thread_top = '';
- $sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or owner_xchan = '" . dbesc($r[0]['abook_xchan']) . "' ) $item_normal ) ";
+ $sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or owner_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or (body like '" . protect_sprintf('%' . $r[0]['xchan_url'] . '%') . "' and item_thread_top = 1 )) $item_normal ) ";
$title = replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => '<a href="' . zid($r[0]['xchan_url']) . '" ><img src="' . zid($r[0]['xchan_photo_s']) . '" alt="' . urlencode($r[0]['xchan_name']) . '" /></a> <a href="' . zid($r[0]['xchan_url']) . '" >' . $r[0]['xchan_name'] . '</a>'
));