aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-07-23 14:17:06 +0000
committerMario <mario@mariovavti.com>2024-07-23 14:17:06 +0000
commit719dbf091a3483bd7d30b8ad0782ff4d14c876bf (patch)
tree1fca997cec5275813e6424d377a1430535fe43b8
parent2dad3a8fe592751ba107a492a8b9f29b0df15e16 (diff)
downloadvolse-hubzilla-719dbf091a3483bd7d30b8ad0782ff4d14c876bf.tar.gz
volse-hubzilla-719dbf091a3483bd7d30b8ad0782ff4d14c876bf.tar.bz2
volse-hubzilla-719dbf091a3483bd7d30b8ad0782ff4d14c876bf.zip
some cleanup
-rw-r--r--include/items.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/items.php b/include/items.php
index 38f8bdca5..a667bc1bc 100644
--- a/include/items.php
+++ b/include/items.php
@@ -2962,20 +2962,21 @@ function tgroup_check($uid, $item) {
dbesc($item['mid']),
intval($uid)
);
- if($r)
+
+ if ($r) {
return true;
+ }
- $u = q("select * from channel left join xchan on channel_hash = xchan_hash where channel_id = %d limit 1",
- intval($uid)
- );
+ $u = channelx_by_n($uid);
- if(! $u)
+ if (!$u) {
return false;
+ }
$max_forums = Config::Get('system','max_tagged_forums',2);
$matched_forums = 0;
- $link = normalise_link($u[0]['xchan_url']);
+ $link = normalise_link($u['xchan_url']);
$terms = [];
@@ -2992,7 +2993,7 @@ function tgroup_check($uid, $item) {
}
$mention = true;
- logger('tgroup_check: mention found for ' . $u[0]['channel_name']);
+ logger('tgroup_check: mention found for ' . $u['channel_name']);
// At this point we've determined that the person receiving this post was mentioned in it.
// Now let's check if this mention was inside a reshare so we don't spam a forum