generalise the output format of xchan_fetch so it matches the input format

This commit is contained in:
friendica 2014-10-23 19:41:42 -07:00
parent 241bb3b940
commit f524fb1f20

View File

@ -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;
}