finish updating zot_finger instances
This commit is contained in:
parent
ed56b6e67b
commit
1cb311cef9
@ -22,9 +22,8 @@ class Gprobe {
|
||||
);
|
||||
|
||||
if(! $r) {
|
||||
$x = zot_finger($url,null);
|
||||
if($x['success']) {
|
||||
$j = json_decode($x['body'],true);
|
||||
$j = \Zotlabs\Zot\Finger::run($url,null);
|
||||
if($j['success']) {
|
||||
$y = import_xchan($j);
|
||||
}
|
||||
}
|
||||
|
@ -62,18 +62,15 @@ class Chanview extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
if($_REQUEST['address']) {
|
||||
$ret = zot_finger($_REQUEST['address'],null);
|
||||
if($ret['success']) {
|
||||
$j = json_decode($ret['body'],true);
|
||||
if($j)
|
||||
import_xchan($j);
|
||||
$j = \Zotlabs\Zot\Finger::run($_REQUEST['address'],null);
|
||||
if($j['success']) {
|
||||
import_xchan($j);
|
||||
$r = q("select * from xchan where xchan_addr = '%s' limit 1",
|
||||
dbesc($_REQUEST['address'])
|
||||
);
|
||||
if($r)
|
||||
\App::$poi = $r[0];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,11 +47,9 @@ class Magic extends \Zotlabs\Web\Controller {
|
||||
*
|
||||
*/
|
||||
|
||||
$ret = zot_finger((($addr) ? $addr : '[system]@' . $parsed['host']),null);
|
||||
if($ret['success']) {
|
||||
$j = json_decode($ret['body'],true);
|
||||
if($j)
|
||||
import_xchan($j);
|
||||
$j = \Zotlabs\Zot\Finger::run((($addr) ? $addr : '[system]@' . $parsed['host']),null);
|
||||
if($j['success']) {
|
||||
import_xchan($j);
|
||||
|
||||
// Now try again
|
||||
|
||||
|
@ -32,17 +32,16 @@ class Mail extends \Zotlabs\Web\Controller {
|
||||
if(! $recipient) {
|
||||
$channel = \App::get_channel();
|
||||
|
||||
$ret = zot_finger($rstr,$channel);
|
||||
$j = \Zotlabs\Zot\Finger::run($rstr,$channel);
|
||||
|
||||
if(! $ret['success']) {
|
||||
if(! $j['success']) {
|
||||
notice( t('Unable to lookup recipient.') . EOL);
|
||||
return;
|
||||
}
|
||||
$j = json_decode($ret['body'],true);
|
||||
|
||||
logger('message_post: lookup: ' . $url . ' ' . print_r($j,true));
|
||||
|
||||
if(! ($j['success'] && $j['guid'])) {
|
||||
if(! $j['guid']) {
|
||||
notice( t('Unable to communicate with requested channel.'));
|
||||
return;
|
||||
}
|
||||
|
@ -60,14 +60,11 @@ class Regdir extends \Zotlabs\Web\Controller {
|
||||
json_return_and_die($result);
|
||||
}
|
||||
|
||||
$f = zot_finger('[system]@' . $m['host']);
|
||||
if($f['success']) {
|
||||
$j = json_decode($f['body'],true);
|
||||
if($j['success'] && $j['guid']) {
|
||||
$x = import_xchan($j);
|
||||
if($x['success']) {
|
||||
$result['success'] = true;
|
||||
}
|
||||
$j = \Zotlabs\Zot\Finger::run('[system]@' . $m['host']);
|
||||
if($j['success'] && $j['guid']) {
|
||||
$x = import_xchan($j);
|
||||
if($x['success']) {
|
||||
$result['success'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,11 +80,9 @@ class Auth {
|
||||
|
||||
if(! $x) {
|
||||
// finger them if they can't be found.
|
||||
$ret = zot_finger($address, null);
|
||||
if ($ret['success']) {
|
||||
$j = json_decode($ret['body'], true);
|
||||
if($j)
|
||||
import_xchan($j);
|
||||
$j = Finger::run($address, null);
|
||||
if ($j['success']) {
|
||||
import_xchan($j);
|
||||
$x = q("select * from hubloc left join xchan on xchan_hash = hubloc_hash
|
||||
where hubloc_addr = '%s' order by hubloc_id desc",
|
||||
dbesc($address)
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -68,9 +68,9 @@ function process_command($line) {
|
||||
|
||||
case 'finger':
|
||||
if(argv(1)) {
|
||||
$x = zot_finger(argv(1),$channel);
|
||||
$x = Zotlabs\Zot\Finger::run(argv(1),$channel);
|
||||
if($x['success'])
|
||||
echo jindent($x['body']);
|
||||
echo jindent($x);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user