aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-21 18:18:33 -0700
committerredmatrix <git@macgirvin.com>2016-05-21 18:18:33 -0700
commit1cb311cef9848178780e3fd52814bf3a64ed0556 (patch)
treec6b8d41d8f30f51c6b8637f6af19f6efd75d1475 /include
parented56b6e67b27900e2ff413a7781c9095aa8251a0 (diff)
downloadvolse-hubzilla-1cb311cef9848178780e3fd52814bf3a64ed0556.tar.gz
volse-hubzilla-1cb311cef9848178780e3fd52814bf3a64ed0556.tar.bz2
volse-hubzilla-1cb311cef9848178780e3fd52814bf3a64ed0556.zip
finish updating zot_finger instances
Diffstat (limited to 'include')
-rw-r--r--include/dir_fns.php5
-rw-r--r--include/follow.php6
-rw-r--r--include/socgraph.php8
3 files changed, 8 insertions, 11 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 1c3149081..4e300663c 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -69,9 +69,8 @@ function check_upstream_directory() {
if ($directory) {
$h = parse_url($directory);
if ($h) {
- $x = zot_finger('[system]@' . $h['host']);
- if ($x['success']) {
- $j = json_decode($x['body'], true);
+ $j = Zotlabs\Zot\Finger::run('[system]@' . $h['host']);
+ if ($j['success']) {
if (array_key_exists('site', $j) && array_key_exists('directory_mode', $j['site'])) {
if ($j['site']['directory_mode'] === 'normal') {
$isadir = false;
diff --git a/include/follow.php b/include/follow.php
index e4f7e8557..dd43c7c4c 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -56,11 +56,11 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
if($arr['channel']['success'])
$ret = $arr['channel'];
elseif(! $is_http)
- $ret = zot_finger($url,$channel);
+ $ret = Zotlabs\Zot\Finger::run($url,$channel);
- if($ret && $ret['success']) {
+ if($ret && is_array($ret) && $ret['success']) {
$is_red = true;
- $j = json_decode($ret['body'],true);
+ $j = $ret;
}
$my_perms = get_channel_default_perms($uid);
diff --git a/include/socgraph.php b/include/socgraph.php
index 1b1bccf20..dffaa8923 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -152,11 +152,9 @@ function poco_load($xchan = '', $url = null) {
if(($x !== false) && (! count($x))) {
if($address) {
if($network === 'zot') {
- $z = zot_finger($address,null);
- if($z['success']) {
- $j = json_decode($z['body'],true);
- if($j)
- import_xchan($j);
+ $j = Zotlabs\Zot\Finger::run($address,null);
+ if($j['success']) {
+ import_xchan($j);
}
$x = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
dbesc($hash)