From ed56b6e67b27900e2ff413a7781c9095aa8251a0 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 21 May 2016 18:02:14 -0700 Subject: first cut at zot-finger request signatures --- Zotlabs/Module/Probe.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Zotlabs/Module/Probe.php') diff --git a/Zotlabs/Module/Probe.php b/Zotlabs/Module/Probe.php index 79abe9819..dda792131 100644 --- a/Zotlabs/Module/Probe.php +++ b/Zotlabs/Module/Probe.php @@ -20,17 +20,17 @@ class Probe extends \Zotlabs\Web\Controller { $channel = \App::get_channel(); $addr = trim($_GET['addr']); $do_import = ((intval($_GET['import']) && is_site_admin()) ? true : false); - $res = zot_finger($addr,$channel,false); + + $j = \Zotlabs\Zot\Finger::run($addr,$channel,false); + + // $res = zot_finger($addr,$channel,false); + $o .= '
';
-			if($res['success'])
-				$j = json_decode($res['body'],true);
-			else {
+			if(! $j['success']) {
 				$o .= sprintf( t('Fetching URL returns error: %1$s'),$res['error'] . "\r\n\r\n");
 				$o .= "https connection failed. Trying again with auto failover to http.\r\n\r\n";
-				$res = zot_finger($addr,$channel,true);
-				if($res['success'])
-					$j = json_decode($res['body'],true);
-				else
+				$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");
 	
 			}
-- 
cgit v1.2.3