aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-11 19:36:07 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-11 19:36:07 -0700
commitaeb69dcbbe38bc2058ebf43305e27d354fa21f9b (patch)
tree982d7b5fd3166e322260efcfe9b5d2f49edb87f9 /mod
parent61e205f593a524e7b93acbeaac4b67c1d24fc1a4 (diff)
downloadvolse-hubzilla-aeb69dcbbe38bc2058ebf43305e27d354fa21f9b.tar.gz
volse-hubzilla-aeb69dcbbe38bc2058ebf43305e27d354fa21f9b.tar.bz2
volse-hubzilla-aeb69dcbbe38bc2058ebf43305e27d354fa21f9b.zip
let the site admin import a record directly from the probe diagnostic
Diffstat (limited to 'mod')
-rw-r--r--mod/probe.php3
1 files changed, 3 insertions, 0 deletions
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 .= '<pre>';
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",'<br />',print_r($j,true));