aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-21 21:39:21 -0700
committerfriendica <info@friendica.com>2012-08-21 21:39:21 -0700
commit72d38d75bf50b1d4696ab6c770d81f5751fbf061 (patch)
tree10f6cde7efd5b463007bbd9ba64452ff2e9506bb
parent8a86f739823d8767dab5a89543338835d6a50fc9 (diff)
downloadvolse-hubzilla-72d38d75bf50b1d4696ab6c770d81f5751fbf061.tar.gz
volse-hubzilla-72d38d75bf50b1d4696ab6c770d81f5751fbf061.tar.bz2
volse-hubzilla-72d38d75bf50b1d4696ab6c770d81f5751fbf061.zip
zfinger - return all additional hubs
-rw-r--r--mod/zfinger.php17
1 files changed, 15 insertions, 2 deletions
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);