From 5a474f94e05e16f48a5683e991112455c38fc6cf Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 29 Jun 2021 05:45:05 +0000 Subject: fix query logic --- include/text.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/text.php b/include/text.php index c0f8c0fb1..9869bfbfa 100644 --- a/include/text.php +++ b/include/text.php @@ -2878,14 +2878,13 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true) $newname = substr($name,1); $newname = substr($newname,0,-1); - $r = q("SELECT * FROM xchan WHERE xchan_addr = '%s' OR xchan_url = '%s' AND xchan_deleted = 0", + $r = q("SELECT * FROM xchan WHERE ( xchan_addr = '%s' OR xchan_url = '%s' ) AND xchan_deleted = 0", dbesc($newname), dbesc($newname) ); } if(! $r) { - // look for matching names in the address book // Double quote the entire mentioned term to include special characters -- cgit v1.2.3