From aeb69dcbbe38bc2058ebf43305e27d354fa21f9b Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 11 May 2015 19:36:07 -0700 Subject: let the site admin import a record directly from the probe diagnostic --- mod/probe.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mod') diff --git a/mod/probe.php b/mod/probe.php index 8e0b60dcc..62a2227b0 100644 --- a/mod/probe.php +++ b/mod/probe.php @@ -15,6 +15,7 @@ function probe_content(&$a) { if(x($_GET,'addr')) { $channel = $a->get_channel(); $addr = trim($_GET['addr']); + $do_import = ((intval($_GET['import']) && is_site_admin()) ? true : false); $res = zot_finger($addr,$channel,false); $o .= '
';
 		if($res['success'])
@@ -29,6 +30,8 @@ function probe_content(&$a) {
 				$o .= sprintf( t('Fetching URL returns error: %1$s'),$res['error'] . "\r\n\r\n");
 
 		}
+		if($do_import && $j)
+			$x = import_xchan($j);
 		if($j && $j['permissions'] && $j['permissions']['iv'])
 			$j['permissions'] = json_decode(crypto_unencapsulate($j['permissions'],$channel['channel_prvkey']),true);
 		$o .= str_replace("\n",'
',print_r($j,true)); -- cgit v1.2.3