aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-17 16:35:22 -0800
committerfriendica <info@friendica.com>2013-12-17 16:35:22 -0800
commit44ead61339745b975d4cff60894afb18b83fa55f (patch)
tree45c1f315d9171d1c2775b994f64dccaa163ca049 /mod
parent9728a1303d4cd6b6cb8866eb79194b2d698b9961 (diff)
downloadvolse-hubzilla-44ead61339745b975d4cff60894afb18b83fa55f.tar.gz
volse-hubzilla-44ead61339745b975d4cff60894afb18b83fa55f.tar.bz2
volse-hubzilla-44ead61339745b975d4cff60894afb18b83fa55f.zip
authtest: do a better job of success/failure indication
Diffstat (limited to 'mod')
-rw-r--r--mod/authtest.php7
-rw-r--r--mod/post.php2
2 files changed, 7 insertions, 2 deletions
diff --git a/mod/authtest.php b/mod/authtest.php
index 2c8d7b4b4..7747ea504 100644
--- a/mod/authtest.php
+++ b/mod/authtest.php
@@ -6,7 +6,7 @@ require_once('mod/magic.php');
function authtest_content(&$a) {
-
+ $auth_success = false;
$o .= '<h3>Magic-Auth Diagnostic</h3>';
if(! local_user()) {
@@ -34,11 +34,16 @@ function authtest_content(&$a) {
if(! $j)
$o .= 'json_decode failure from remote site. ' . print_r($z['body'],true);
$o .= 'Remote site responded: ' . print_r($j,true);
+ if(strpos($j,'Authentication Success'))
+ $auth_success = true;
}
else {
$o .= 'fetch url failure.' . print_r($z,true);
}
}
+
+ if(! $auth_success)
+ $o .= 'Authentication Failed!' . EOL;
}
return str_replace("\n",'<br />',$o);
diff --git a/mod/post.php b/mod/post.php
index 73345c4e9..7f495140e 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -232,7 +232,7 @@ function post_init(&$a) {
if($test) {
$ret['success'] = true;
- $ret['message'] .= 'Success' . EOL;
+ $ret['message'] .= 'Authentication Success!' . EOL;
json_return_and_die($ret);
}