From 94e87c0a84c8ecb2fc26015bc8894ca0ca6cbf02 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 17 Jul 2013 21:53:35 -0700 Subject: update friends/followers API so Friendica Android client won't choke --- include/api.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/api.php') diff --git a/include/api.php b/include/api.php index 50ecbd570..c79ac4a9b 100644 --- a/include/api.php +++ b/include/api.php @@ -1644,11 +1644,11 @@ require_once('include/photos.php'); // This won't work if either of you send your stream to everybody on the network if($qtype == 'friends') - $sql_extra = sprintf(" AND ( their_perms & %d ) and ( my_perms & %d ) ", intval(PERMS_W_STREAM), intval(PERMS_W_STREAM)); + $sql_extra = sprintf(" AND ( abook_their_perms & %d ) and ( abook_my_perms & %d ) ", intval(PERMS_W_STREAM), intval(PERMS_W_STREAM)); if($qtype == 'followers') - $sql_extra = sprintf(" AND ( my_perms & %d ) and not ( their_perms & %d ) ", intval(PERMS_W_STREAM), intval(PERMS_W_STREAM)); + $sql_extra = sprintf(" AND ( abook_my_perms & %d ) and not ( abook_their_perms & %d ) ", intval(PERMS_W_STREAM), intval(PERMS_W_STREAM)); - $r = q("SELECT id FROM abook where abook_flags = 0 and abook_channel = %d $sql_extra", + $r = q("SELECT abook_xchan FROM abook where abook_flags = 0 and abook_channel = %d $sql_extra", intval(api_user()) ); @@ -1657,14 +1657,14 @@ require_once('include/photos.php'); header("Content-type: application/xml"); echo '' . "\r\n" . '' . "\r\n"; foreach($r as $rr) - echo '' . $rr['id'] . '' . "\r\n"; + echo '' . $rr['abook_xchan'] . '' . "\r\n"; echo '' . "\r\n"; killme(); } elseif($type === 'json') { $ret = array(); header("Content-type: application/json"); - foreach($r as $rr) $ret[] = $rr['id']; + foreach($r as $rr) $ret[] = $rr['abook_xchan']; echo json_encode($ret); killme(); } -- cgit v1.2.3