wildcard tag issue

(cherry picked from commit 2f4c619d510e64eeda05366e485d50f490cefebe)
This commit is contained in:
zotlabs 2019-11-13 04:25:25 +00:00 committed by Mario
parent 08b804cd2d
commit 3a2fdec241

View File

@ -2789,6 +2789,9 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
// select someone by attag or nick and the name passed in
if(! $r) {
// strip user-supplied wildcards before running a wildcard search
$newname = str_replace('%','',$newname);
$r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
WHERE xchan_addr like ('%s') AND abook_channel = %d ",
dbesc(((strpos($newname,'@')) ? $newname : $newname . '@%')),