From ad51be7dd9446b1338f2e140a479a497f56820f3 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 8 Oct 2020 18:18:44 +0000 Subject: reduce result set for query in zid_init() and use Libzot::zot_record_preferred() in mod rmagic --- include/channel.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index a51404652..ccec4f9ee 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1925,7 +1925,7 @@ function zid_init() { call_hooks('zid_init', $arr); if(! local_channel()) { - $r = q("select * from hubloc where hubloc_addr = '%s' order by hubloc_connected desc", + $r = q("select hubloc_url, hubloc_hash, hubloc_network from hubloc where hubloc_addr = '%s' order by hubloc_connected desc", dbesc($tmp_str) ); if(! $r) { @@ -1934,6 +1934,7 @@ function zid_init() { if($r) { $r = Libzot::zot_record_preferred($r); } + if($r && remote_channel() && remote_channel() === $r['hubloc_hash']) return; -- cgit v1.2.3