diff options
author | friendica <info@friendica.com> | 2012-12-31 15:47:51 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-12-31 15:47:51 -0800 |
commit | a8812346c4a2962182b66345bf93144bc13c16ad (patch) | |
tree | dd55186b4de5c6d168626fc3a3cd8908e2998093 /include | |
parent | 791302f317de466a079b71e548892c4ffc172005 (diff) | |
download | volse-hubzilla-a8812346c4a2962182b66345bf93144bc13c16ad.tar.gz volse-hubzilla-a8812346c4a2962182b66345bf93144bc13c16ad.tar.bz2 volse-hubzilla-a8812346c4a2962182b66345bf93144bc13c16ad.zip |
couple of fixes to follow, prepare for default connection permissions
Diffstat (limited to 'include')
-rw-r--r-- | include/follow.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/follow.php b/include/follow.php index 6eac2d465..1403dcb23 100644 --- a/include/follow.php +++ b/include/follow.php @@ -118,7 +118,7 @@ function new_contact($uid,$url,$channel,$interactive = false) { return $result; } - $r = q("select abook_xchan from abook_id where abook_xchan = '%s' and abook_channel = %d limit 1", + $r = q("select abook_xchan from abook where abook_xchan = '%s' and abook_channel = %d limit 1", dbesc($xchan_hash), intval($uid) ); @@ -143,6 +143,14 @@ function new_contact($uid,$url,$channel,$interactive = false) { if(! $r) logger('mod_follow: abook creation failed'); + $r = q("select abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash + where abook_xchan = '%s' and abook_channel = %d limit 1", + dbesc($xchan_hash), + intval($uid) + ); + if($r) + $result['abook'] = $r[0]; + // Then send a ping/message to the other side |