From 72d38d75bf50b1d4696ab6c770d81f5751fbf061 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 21 Aug 2012 21:39:21 -0700 Subject: zfinger - return all additional hubs --- mod/zfinger.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'mod/zfinger.php') diff --git a/mod/zfinger.php b/mod/zfinger.php index 1434471ca..1da5c613b 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -2,7 +2,7 @@ function zfinger_init(&$a) { -logger('args: ' . print_r($a->argv,true)); + require_once('include/zot.php'); $ret = array('success' => false, 'message' => ''); if(argc() > 1) { @@ -32,7 +32,20 @@ logger('args: ' . print_r($a->argv,true)); $ret['sitekey'] = get_config('system','pubkey'); $ret['key'] = $e['pubkey']; - // more stuff + $ret['hubs'] = array(); + $x = zot_get_hubloc(array($e['entity_global_id'])); + if($x && count($x)) { + foreach($x as $hub) { + $ret['hubs'][] = array( + 'primary' => (bool) $hub['hubloc_primary'], + 'url' => $hub['hubloc_url'], + 'callback' => $hub['hubloc_callback'], + 'sitekey' => $hub['hubloc_sitekey'] + ); + } + } + + // more stuff json_return_and_die($ret); -- cgit v1.2.3