diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-06-08 23:19:30 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-06-08 23:19:30 +0200 |
commit | 1fbc1314695feff17ec9d6ecaa009f5e554ad109 (patch) | |
tree | 8252f950943b54666ab7b1c85f2bda6d4735f181 /Zotlabs/Module/Network.php | |
parent | 468af29e3e4fb5c59f44afe8e870e21b66153992 (diff) | |
download | volse-hubzilla-1fbc1314695feff17ec9d6ecaa009f5e554ad109.tar.gz volse-hubzilla-1fbc1314695feff17ec9d6ecaa009f5e554ad109.tar.bz2 volse-hubzilla-1fbc1314695feff17ec9d6ecaa009f5e554ad109.zip |
if unthreaded and cid and not pf, query author only
Diffstat (limited to 'Zotlabs/Module/Network.php')
-rw-r--r-- | Zotlabs/Module/Network.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 9837d35a3..132770608 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -262,13 +262,18 @@ class Network extends \Zotlabs\Web\Controller { $item_thread_top = ''; if($load || $update) { - $ttype = (($pf) ? TERM_FORUM : TERM_MENTION); + if(!$pf && $nouveau) { + $sql_extra = " AND author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' "; + } + else { + $ttype = (($pf) ? TERM_FORUM : TERM_MENTION); - $p1 = q("SELECT DISTINCT parent FROM item WHERE uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' OR owner_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ) $item_normal "); - $p2 = q("SELECT oid AS parent FROM term WHERE uid = " . intval(local_channel()) . " AND ttype = $ttype AND term = '" . dbesc($cid_r[0]['xchan_name']) . "'"); + $p1 = q("SELECT DISTINCT parent FROM item WHERE uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' OR owner_xchan = '" . dbesc($cid_r[0]['abook_xchan']) . "' ) $item_normal "); + $p2 = q("SELECT oid AS parent FROM term WHERE uid = " . intval(local_channel()) . " AND ttype = $ttype AND term = '" . dbesc($cid_r[0]['xchan_name']) . "'"); - $p_str = ids_to_querystr(array_merge($p1,$p2),'parent'); - $sql_extra = " AND item.parent IN ( $p_str ) "; + $p_str = ids_to_querystr(array_merge($p1,$p2),'parent'); + $sql_extra = " AND item.parent IN ( $p_str ) "; + } } $title = replace_macros(get_markup_template("section_title.tpl"),array( |