aboutsummaryrefslogtreecommitdiffstats
path: root/include/hubloc.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-14 19:16:25 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-14 19:16:25 -0700
commit97b990c9bf0c08e9088ea8dea54177c044eaa6ad (patch)
tree4354a2ea87c4cf7a83d16f233fdf2233a95a89b0 /include/hubloc.php
parent8fb4f376702ad3d4417bb2c4d8937a9911cb56ca (diff)
downloadvolse-hubzilla-97b990c9bf0c08e9088ea8dea54177c044eaa6ad.tar.gz
volse-hubzilla-97b990c9bf0c08e9088ea8dea54177c044eaa6ad.tar.bz2
volse-hubzilla-97b990c9bf0c08e9088ea8dea54177c044eaa6ad.zip
site checking stuff
Diffstat (limited to 'include/hubloc.php')
-rw-r--r--include/hubloc.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/hubloc.php b/include/hubloc.php
index 8bd6d8d68..674a3885f 100644
--- a/include/hubloc.php
+++ b/include/hubloc.php
@@ -291,13 +291,18 @@ function ping_site($url) {
$ret['message'] = 'no answer from ' . $url;
return $ret;
}
- $packet_result = $r['body'];
+ $packet_result = json_decode($r['body'],true);
if(! $packet_result['success']) {
$ret['message'] = 'packet failure from ' . $url;
return $ret;
}
- $ret['success'] = true;
- return $ret;
+ if($packet_result['success']) {
+ $ret['success'] = true;
+ }
+ else {
+ $ret['message'] = 'unknown error from ' . $url;
+ }
+ return $ret;
}