diff options
author | Mario <mario@mariovavti.com> | 2023-03-19 13:55:18 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-03-19 13:55:18 +0000 |
commit | 89285f1408d21091bb80d45b391ddcbe06ba8d0f (patch) | |
tree | b2eb07d9f3d91d77f89a4565a58e6e5231b20c1c /Zotlabs/Module/Chanview.php | |
parent | 0a679e503ef367eda3085c44af103ee53869a94f (diff) | |
parent | 17c0bb2069dcfe35d3febc5bfdb3a7295f15d49c (diff) | |
download | volse-hubzilla-8.2.tar.gz volse-hubzilla-8.2.tar.bz2 volse-hubzilla-8.2.zip |
Merge branch '8.2RC'8.2
Diffstat (limited to 'Zotlabs/Module/Chanview.php')
-rw-r--r-- | Zotlabs/Module/Chanview.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Zotlabs/Module/Chanview.php b/Zotlabs/Module/Chanview.php index f43432376..e178b27df 100644 --- a/Zotlabs/Module/Chanview.php +++ b/Zotlabs/Module/Chanview.php @@ -16,17 +16,17 @@ class Chanview extends \Zotlabs\Web\Controller { $r = null; - if(isset($_REQUEST['hash']) && $_REQUEST['hash']) { + if(!empty($_REQUEST['hash'])) { $r = q("select * from xchan where xchan_hash = '%s' and xchan_deleted = 0", dbesc($_REQUEST['hash']) ); } - if(isset($_REQUEST['address']) && $_REQUEST['address']) { + if(!empty($_REQUEST['address'])) { $r = q("select * from xchan where xchan_addr = '%s' and xchan_deleted = 0", dbesc(punify($_REQUEST['address'])) ); } - elseif(local_channel() && isset($_REQUEST['cid']) && $_REQUEST['cid']) { + elseif(local_channel() && !empty($_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 and xchan_deleted = 0", @@ -34,8 +34,7 @@ class Chanview extends \Zotlabs\Web\Controller { intval($_REQUEST['cid']) ); } - elseif(isset($_REQUEST['url']) && $_REQUEST['url']) { - + elseif(!empty($_REQUEST['url'])) { // 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. @@ -56,7 +55,7 @@ class Chanview extends \Zotlabs\Web\Controller { if(! App::$poi) { logger('mod_chanview: fallback'); - if(isset($_REQUEST['address']) && $_REQUEST['address']) { + if(!empty($_REQUEST['address'])) { $href = Webfinger::zot_url(punify($_REQUEST['address'])); if($href) { $_REQUEST['url'] = $href; @@ -65,9 +64,9 @@ class Chanview extends \Zotlabs\Web\Controller { $r = null; - if(isset($_REQUEST['url']) && $_REQUEST['url']) { + if(!empty($_REQUEST['url'])) { - $zf = Zotfinger::exec($_REQUEST['url'], null); + $zf = Zotfinger::exec($_REQUEST['url']); if(array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $_REQUEST['url'] && intval($zf['signature']['header_valid'])) { Libzot::import_xchan($zf['data']); @@ -79,6 +78,7 @@ class Chanview extends \Zotlabs\Web\Controller { } } if(! $r) { + if(discover_by_webbie($_REQUEST['url'])) { $r = q("select * from xchan where xchan_url = '%s' and xchan_deleted = 0", dbesc($_REQUEST['url']) |