aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Connect.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-05-10 08:14:51 +0000
committerMario <mario@mariovavti.com>2023-05-10 08:14:51 +0000
commitce0a96351ec216c90fb1fe3f9294e444053c9212 (patch)
tree454018f97f8923b666f420e9a67f2cb8fde04efb /Zotlabs/Lib/Connect.php
parent5e83db959eff4b61ada810f4c323a7e3f61c3405 (diff)
downloadvolse-hubzilla-ce0a96351ec216c90fb1fe3f9294e444053c9212.tar.gz
volse-hubzilla-ce0a96351ec216c90fb1fe3f9294e444053c9212.tar.bz2
volse-hubzilla-ce0a96351ec216c90fb1fe3f9294e444053c9212.zip
make sure we have a xchan and a hubloc - otherwise re-discover
Diffstat (limited to 'Zotlabs/Lib/Connect.php')
-rw-r--r--Zotlabs/Lib/Connect.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Connect.php b/Zotlabs/Lib/Connect.php
index 802bbe0f5..c5478bf97 100644
--- a/Zotlabs/Lib/Connect.php
+++ b/Zotlabs/Lib/Connect.php
@@ -69,7 +69,8 @@ class Connect {
$xchan_hash = '';
$sql_options = (($protocol) ? " and xchan_network = '" . dbesc($protocol) . "' " : '');
- $r = q("SELECT * FROM xchan LEFT JOIN hubloc ON xchan_hash = hubloc_hash WHERE ( xchan_hash = '%s' or xchan_url = '%s' or xchan_addr = '%s') $sql_options ORDER BY hubloc_id DESC",
+ // We need both, the xchan and the hubloc here hence use JOIN instead of LEFT JOIN here
+ $r = q("SELECT * FROM xchan JOIN hubloc ON xchan_hash = hubloc_hash WHERE ( xchan_hash = '%s' or xchan_url = '%s' or xchan_addr = '%s') $sql_options ORDER BY hubloc_id DESC",
dbesc($url),
dbesc($url),
dbesc($url)