diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/hubloc.php | 12 |
1 files changed, 11 insertions, 1 deletions
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 |