diff options
author | Mario <mario@mariovavti.com> | 2024-11-09 20:12:21 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-11-09 20:12:21 +0000 |
commit | f05b8bd87d9391cb8411514eaa751de289fb2d76 (patch) | |
tree | b5af46f04f8bf6bd38840b216a8067b9c708f33b | |
parent | e466c734071b52f71a8274d8a7d3329f9c5314ce (diff) | |
download | volse-hubzilla-f05b8bd87d9391cb8411514eaa751de289fb2d76.tar.gz volse-hubzilla-f05b8bd87d9391cb8411514eaa751de289fb2d76.tar.bz2 volse-hubzilla-f05b8bd87d9391cb8411514eaa751de289fb2d76.zip |
Do not filter deleted hublocs in xchan_query because it will result in empty profile info in conversations if the hubloc was deleted. Deleting a hublocation does not neccesarily delete its content and the author could appear again from another location.
(cherry picked from commit 4e6696b049beec7ed4616b5a3f7e4a0b60d3be09)
Co-authored-by: Mario Vavti <mario@mariovavti.com>
-rw-r--r-- | include/text.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php index e69ce7d10..18a70c3a5 100644 --- a/include/text.php +++ b/include/text.php @@ -2639,13 +2639,13 @@ function xchan_query(&$items, $abook = true, $effective_uid = 0) { if(count($arr)) { if($abook) { $chans = q("select * from xchan left join hubloc on hubloc_hash = xchan_hash left join abook on abook_xchan = xchan_hash and abook_channel = %d - where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") and hubloc_deleted = 0 order by hubloc_primary desc", + where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") order by hubloc_primary desc, hubloc_deleted ASC", intval($item['uid']) ); } else { $chans = q("select xchan.*,hubloc.* from xchan left join hubloc on hubloc_hash = xchan_hash - where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") and hubloc_deleted = 0 order by hubloc_primary desc"); + where xchan_hash in (" . protect_sprintf(implode(',', $arr)) . ") order by hubloc_primary desc, hubloc_deleted ASC"); } $xchans = q("select * from xchan where xchan_hash in (" . protect_sprintf(implode(',',$arr)) . ") and xchan_network in ('rss','unknown', 'anon', 'token')"); if(! $chans) |