aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-10-07 08:02:04 +0000
committerMario <mario@mariovavti.com>2020-10-07 08:02:04 +0000
commit2690159f09ff5104a4f3d3cfb5d5e326a6f28d1a (patch)
treeaec0555487321b0344c760b44ebb414310c349fd
parent902151918c46e4ff9a40c5dc66a163aac0267f8e (diff)
downloadvolse-hubzilla-2690159f09ff5104a4f3d3cfb5d5e326a6f28d1a.tar.gz
volse-hubzilla-2690159f09ff5104a4f3d3cfb5d5e326a6f28d1a.tar.bz2
volse-hubzilla-2690159f09ff5104a4f3d3cfb5d5e326a6f28d1a.zip
5.0RC testing: use the zot6 xchan if available
-rw-r--r--Zotlabs/Module/Chanview.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/Zotlabs/Module/Chanview.php b/Zotlabs/Module/Chanview.php
index 06ff10f9e..12e1891d4 100644
--- a/Zotlabs/Module/Chanview.php
+++ b/Zotlabs/Module/Chanview.php
@@ -17,19 +17,19 @@ class Chanview extends \Zotlabs\Web\Controller {
$r = null;
if($_REQUEST['hash']) {
- $r = q("select * from xchan where xchan_hash = '%s' limit 1",
+ $r = q("select * from xchan where xchan_hash = '%s'",
dbesc($_REQUEST['hash'])
);
}
if($_REQUEST['address']) {
- $r = q("select * from xchan where xchan_addr = '%s' limit 1",
+ $r = q("select * from xchan where xchan_addr = '%s'",
dbesc(punify($_REQUEST['address']))
);
}
elseif(local_channel() && intval($_REQUEST['cid'])) {
$r = q("SELECT abook.*, xchan.*
FROM abook left join xchan on abook_xchan = xchan_hash
- WHERE abook_channel = %d and abook_id = %d LIMIT 1",
+ WHERE abook_channel = %d and abook_id = %d",
intval(local_channel()),
intval($_REQUEST['cid'])
);
@@ -39,12 +39,12 @@ class Chanview extends \Zotlabs\Web\Controller {
// if somebody re-installed they will have more than one xchan, use the most recent name date as this is
// the most useful consistently ascending table item we have.
- $r = q("select * from xchan where xchan_url = '%s' order by xchan_name_date desc limit 1",
+ $r = q("select * from xchan where xchan_url = '%s' order by xchan_name_date desc",
dbesc($_REQUEST['url'])
);
}
if($r) {
- App::$poi = $r[0];
+ App::$poi = Libzot::zot_record_preferred($r, 'xchan_network');
}
@@ -71,20 +71,20 @@ class Chanview extends \Zotlabs\Web\Controller {
if(array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $_REQUEST['url'] && intval($zf['signature']['header_valid'])) {
Libzot::import_xchan($j);
- $r = q("select * from xchan where xchan_url = '%s' limit 1",
+ $r = q("select * from xchan where xchan_url = '%s'",
dbesc($_REQUEST['url'])
);
if($r) {
- App::$poi = $r[0];
+ App::$poi = Libzot::zot_record_preferred($r, 'xchan_network');
}
}
if(! $r) {
if(discover_by_webbie($_REQUEST['url'])) {
- $r = q("select * from xchan where xchan_url = '%s' limit 1",
+ $r = q("select * from xchan where xchan_url = '%s'",
dbesc($_REQUEST['url'])
);
if($r) {
- App::$poi = $r[0];
+ App::$poi = Libzot::zot_record_preferred($r, 'xchan_network');
}
}
}