From f524fb1f20ec3edb0cf2c486d41f6bb65a60db6a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 23 Oct 2014 19:41:42 -0700 Subject: generalise the output format of xchan_fetch so it matches the input format --- include/hubloc.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/hubloc.php') diff --git a/include/hubloc.php b/include/hubloc.php index df817329f..0a1b51331 100644 --- a/include/hubloc.php +++ b/include/hubloc.php @@ -247,5 +247,15 @@ function xchan_fetch($arr) { return false; $r = q("select * from xchan where $key = '$v'"); - return $r; + if(! $r) + return false; + + $ret = array(); + foreach($r as $k => $v) { + if($k === 'xchan_addr') + $ret['address'] = $v; + else + $ret[str_replace('xchan_','',$k)] = $v; + } + return $ret; } \ No newline at end of file -- cgit v1.2.3