diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-08-09 11:07:38 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-08-09 11:07:38 +0200 |
commit | 5c5a808290b5e7b0ede1ad3f2a1574c6d7f76dc3 (patch) | |
tree | cf799e20dd003007939e7702700ed564bc86e5e2 /Zotlabs/Module | |
parent | 5c30b2f27133d4fe20e509f095951e1fb36e77ba (diff) | |
parent | 1d13cc1601eb6e4a127d975465fda32d92c402a1 (diff) | |
download | volse-hubzilla-5c5a808290b5e7b0ede1ad3f2a1574c6d7f76dc3.tar.gz volse-hubzilla-5c5a808290b5e7b0ede1ad3f2a1574c6d7f76dc3.tar.bz2 volse-hubzilla-5c5a808290b5e7b0ede1ad3f2a1574c6d7f76dc3.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Probe.php | 7 | ||||
-rw-r--r-- | Zotlabs/Module/Zfinger.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Zot.php | 25 |
3 files changed, 28 insertions, 8 deletions
diff --git a/Zotlabs/Module/Probe.php b/Zotlabs/Module/Probe.php index 2e65f107c..2c67c6aae 100644 --- a/Zotlabs/Module/Probe.php +++ b/Zotlabs/Module/Probe.php @@ -27,12 +27,11 @@ class Probe extends \Zotlabs\Web\Controller { $o .= '<pre>'; if(! $j['success']) { - $o .= sprintf( t('Fetching URL returns error: %1$s'),$res['error'] . "\r\n\r\n"); $o .= "<strong>https connection failed. Trying again with auto failover to http.</strong>\r\n\r\n"; $j = \Zotlabs\Zot\Finger::run($addr,$channel,true); - if(! $j['success']) - $o .= sprintf( t('Fetching URL returns error: %1$s'),$res['error'] . "\r\n\r\n"); - + if(! $j['success']) { + return $o; + } } if($do_import && $j) $x = import_xchan($j); diff --git a/Zotlabs/Module/Zfinger.php b/Zotlabs/Module/Zfinger.php index 0f7f6a64b..6ed001df5 100644 --- a/Zotlabs/Module/Zfinger.php +++ b/Zotlabs/Module/Zfinger.php @@ -36,10 +36,6 @@ class Zfinger extends \Zotlabs\Web\Controller { echo $ret; killme(); - - - - json_return_and_die($x); } diff --git a/Zotlabs/Module/Zot.php b/Zotlabs/Module/Zot.php new file mode 100644 index 000000000..8c34dced1 --- /dev/null +++ b/Zotlabs/Module/Zot.php @@ -0,0 +1,25 @@ +<?php +/** + * @file Zotlabs/Module/Zot.php + * + * @brief Zot endpoint. + * + */ + +namespace Zotlabs\Module; + +use Zotlabs\Zot6 as ZotProtocol; + +/** + * @brief Zot module. + * + */ + +class Zot extends \Zotlabs\Web\Controller { + + function init() { + $zot = new ZotProtocol\Receiver(new ZotProtocol\Zot6Handler()); + json_return_and_die($zot->run(),'application/x-zot+jzon'); + } + +} |