fix query with protocol prefix not always picking the right xchan
(cherry picked from commit 03317b9864c0d7c99e144404c647b9923d8d29ea)
This commit is contained in:
parent
64c6e25896
commit
a049664219
@ -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 ",
|
||||
$r = q("select * from xchan where (xchan_addr = '%s' or xchan_url = '%s') $sql_options ",
|
||||
dbesc($url),
|
||||
dbesc($url)
|
||||
);
|
||||
|
Reference in New Issue
Block a user