aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-05-26 09:36:13 +0000
committerMario <mario@mariovavti.com>2021-05-26 09:36:13 +0000
commitec02eda11323fe27d2b23e6d289eb3d97c9eddc9 (patch)
tree31b740d0255e8836da3b101f01c2ea6cb91acc47 /include/text.php
parent8d8523684c2a1eed1cdff2573c9fa9bfbb7959de (diff)
downloadvolse-hubzilla-ec02eda11323fe27d2b23e6d289eb3d97c9eddc9.tar.gz
volse-hubzilla-ec02eda11323fe27d2b23e6d289eb3d97c9eddc9.tar.bz2
volse-hubzilla-ec02eda11323fe27d2b23e6d289eb3d97c9eddc9.zip
handle_tag(): only use xchans with xhchan_deleted = 0
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/text.php b/include/text.php
index 622c44f14..d2ab8bc72 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2903,7 +2903,7 @@ 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'",
+ $r = q("SELECT * FROM xchan WHERE xchan_addr = '%s' OR xchan_url = '%s' AND xchan_deleted = 0",
dbesc($newname),
dbesc($newname)
);
@@ -2929,18 +2929,18 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
// select someone from this user's contacts by name
- $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash
- WHERE xchan_name = '%s' AND abook_channel = %d ",
- dbesc($newname),
- intval($profile_uid)
+ $r = q("SELECT * FROM abook LEFT JOIN xchan ON abook_xchan = xchan_hash
+ WHERE xchan_name = '%s' AND abook_channel = %d AND xchan_deleted = 0",
+ dbesc($newname),
+ intval($profile_uid)
);
// select anybody by full hubloc_addr
if((! $r) && strpos($newname,'@')) {
- $r = q("SELECT * FROM xchan left join hubloc on xchan_hash = hubloc_hash
- WHERE hubloc_addr = '%s' ",
- dbesc($newname)
+ $r = q("SELECT * FROM xchan LEFT JOIN hubloc ON xchan_hash = hubloc_hash
+ WHERE hubloc_addr = '%s' AND xchan_deleted = 0 ",
+ dbesc($newname)
);
}
@@ -2950,10 +2950,10 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
// 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 . '@%')),
- intval($profile_uid)
+ $r = q("SELECT * FROM abook LEFT JOIN xchan ON abook_xchan = xchan_hash
+ WHERE xchan_addr LIKE ('%s') AND abook_channel = %d AND xchan_deleted = 0",
+ dbesc(((strpos($newname,'@')) ? $newname : $newname . '@%')),
+ intval($profile_uid)
);
}