diff options
author | zotlabs <mike@macgirvin.com> | 2016-11-14 21:06:58 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-11-14 21:06:58 -0800 |
commit | e990a35a91014e5874ca21dfb057b2435c9bada6 (patch) | |
tree | e491630b3b58314d26b20bd1b3dc56b1b8d8ccda | |
parent | 3e286f4f196584bc6a4db6bc9dc2eb3e655a1d3c (diff) | |
download | volse-hubzilla-e990a35a91014e5874ca21dfb057b2435c9bada6.tar.gz volse-hubzilla-e990a35a91014e5874ca21dfb057b2435c9bada6.tar.bz2 volse-hubzilla-e990a35a91014e5874ca21dfb057b2435c9bada6.zip |
xchan_fetch() returns a simplified structure
-rw-r--r-- | include/api_zot.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/api_zot.php b/include/api_zot.php index ff3bc6dc5..60cb288af 100644 --- a/include/api_zot.php +++ b/include/api_zot.php @@ -313,7 +313,7 @@ $perm = ((array_key_exists('perm',$_REQUEST)) ? $_REQUEST['perm'] : ''); if(array_key_exists('abook_id',$_REQUEST) && intval($_REQUEST['abook_id'])) { - $r = q("select abook_xchan as xchan_hash from abook where abook_id = %d and abook_channel = %d limit 1", + $r = q("select abook_xchan as hash from abook where abook_id = %d and abook_channel = %d limit 1", intval($_REQUEST['abook_id']), intval(api_user()) ); @@ -326,10 +326,10 @@ if($r) { if($perm) - $x = [ [ 'perm' => $perm, 'allowed' => perm_is_allowed(api_user(), $r[0]['xchan_hash'], $perm)] ]; + $x = [ [ 'perm' => $perm, 'allowed' => perm_is_allowed(api_user(), $r[0]['hash'], $perm)] ]; else { $x = []; - $p = get_all_perms(api_user(),$r[0]['xchan_hash']); + $p = get_all_perms(api_user(),$r[0]['hash']); if($p) { foreach($p as $k => $v) $x[] = [ 'perm' => $k, 'allowed' => $v ]; |