aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-12-08 20:40:37 +0000
committerMario <mario@mariovavti.com>2022-12-08 20:40:37 +0000
commit4f9a933108eb0a41671ec9464f1d7fb90c2d2233 (patch)
tree9c2a5362f6a368536dbec926b82419e12b1b303a
parent9f8585914c59117a41cd232435bc1e592ebdc0f1 (diff)
downloadvolse-hubzilla-4f9a933108eb0a41671ec9464f1d7fb90c2d2233.tar.gz
volse-hubzilla-4f9a933108eb0a41671ec9464f1d7fb90c2d2233.tar.bz2
volse-hubzilla-4f9a933108eb0a41671ec9464f1d7fb90c2d2233.zip
exclude not tagable xchan networks handle_tag()
-rw-r--r--include/text.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php
index af6ad7ea2..cc480aacf 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2969,7 +2969,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' ) AND xchan_deleted = 0",
+ $r = q("SELECT * FROM xchan WHERE ( xchan_addr = '%s' OR xchan_url = '%s' ) AND xchan_deleted = 0 AND NOT xchan_network IN ('rss', 'anon', 'unknown')",
dbesc($newname),
dbesc($newname)
);
@@ -2995,7 +2995,7 @@ 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 AND xchan_deleted = 0",
+ WHERE xchan_name = '%s' AND abook_channel = %d AND xchan_deleted = 0 AND NOT xchan_network IN ('rss', 'anon', 'unknown')",
dbesc($newname),
intval($profile_uid)
);
@@ -3004,7 +3004,7 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
if((! $r) && strpos($newname,'@')) {
$r = q("SELECT * FROM xchan LEFT JOIN hubloc ON xchan_hash = hubloc_hash
- WHERE hubloc_addr = '%s' AND xchan_deleted = 0 ",
+ WHERE hubloc_addr = '%s' AND xchan_deleted = 0 AND NOT xchan_network IN ('rss', 'anon', 'unknown')",
dbesc($newname)
);
}
@@ -3016,7 +3016,7 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
$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 AND xchan_deleted = 0",
+ WHERE xchan_addr LIKE ('%s') AND abook_channel = %d AND xchan_deleted = 0 AND NOT xchan_network IN ('rss', 'anon', 'unknown')",
dbesc(((strpos($newname,'@')) ? $newname : $newname . '@%')),
intval($profile_uid)
);