From c0911da887d610f95c5f544d4b6f63914b1c85bb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 6 May 2019 04:19:54 -0700 Subject: review of last commit --- include/follow.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/follow.php') diff --git a/include/follow.php b/include/follow.php index 7e0e1644a..50b952881 100644 --- a/include/follow.php +++ b/include/follow.php @@ -142,7 +142,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $sql_options = (($protocol) ? " and xchan_network = '" . dbesc($protocol) . "' " : ''); - $r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s' $sql_options limit 1", + $r = q("select * from xchan where xchan_hash = '%s' or xchan_url = '%s' $sql_options ", dbesc($url), dbesc($url) ); @@ -194,7 +194,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $allowed = (($is_zot || in_array($xchan['xchan_network'],['rss','zot6'])) ? 1 : 0); - $x = array('channel_id' => $uid, 'follow_address' => $url, 'xchan' => $r[0], 'allowed' => $allowed, 'singleton' => 0); + $x = array('channel_id' => $uid, 'follow_address' => $url, 'xchan' => $xchan, 'allowed' => $allowed, 'singleton' => 0); call_hooks('follow_allow',$x); -- cgit v1.2.3