From 52757f6a1a0c693a0372f63a3c447e2c6bec01a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 25 Jun 2025 04:40:57 +0200 Subject: [PATCH] Reverted --- .../Repository/UserDefinedChannel.php | 66 ------------------- 1 file changed, 66 deletions(-) diff --git a/src/Content/Conversation/Repository/UserDefinedChannel.php b/src/Content/Conversation/Repository/UserDefinedChannel.php index 5b8317b865..b256e34e56 100644 --- a/src/Content/Conversation/Repository/UserDefinedChannel.php +++ b/src/Content/Conversation/Repository/UserDefinedChannel.php @@ -156,8 +156,6 @@ class UserDefinedChannel extends BaseRepository * * @param string $haystack * @param string $language - * @param array $tags - * @param int $media_type * @return boolean * @throws \Exception */ @@ -176,59 +174,6 @@ class UserDefinedChannel extends BaseRepository if (!empty($channel->languages) && in_array($language, $channel->languages)) { return true; } - if (!empty($channel->languages) && !in_array($channel->uid, $uids)) { - if (!in_array($language, $channel->languages)) { - continue; - } - } elseif (!in_array($language, User::getWantedLanguages($channel->uid))) { - continue; - } - if (!empty($channel->includeTags) && !in_array($channel->uid, $uids)) { - if (empty($tags)) { - continue; - } - $match = false; - foreach (explode(',', $channel->includeTags) as $tag) { - if (in_array($tag, $tags)) { - $match = true; - break; - } - } - if (!$match) { - continue; - } - } - if (!empty($tags) && !empty($channel->excludeTags) && !in_array($channel->uid, $uids)) { - $match = false; - foreach (explode(',', $channel->excludeTags) as $tag) { - if (in_array($tag, $tags)) { - $match = true; - break; - } - } - if ($match) { - continue; - } - } - if (!empty($channel->mediaType) && !in_array($channel->uid, $uids)) { - if (!($channel->mediaType & $media_type)) { - continue; - } - } - if (!empty($channel->fullTextSearch) && !in_array($channel->uid, $uids)) { - $channelsearchtext = $channel->fullTextSearch; - foreach (Engagement::KEYWORDS as $keyword) { - $channelsearchtext = preg_replace('~(' . $keyword . ':.[\w@\.-]+)~', '"$1"', $channelsearchtext); - } - if (!$this->db->exists('check-full-text-search', ["`pid` = ? AND MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", getmypid(), $channelsearchtext])) { - continue; - } - } - $uids[] = $channel->uid; - $this->logger->debug('Matching channel found.', ['uid' => $channel->uid, 'label' => $channel->label, 'language' => $language, 'tags' => $tags, 'media_type' => $media_type, 'searchtext' => $searchtext]); - if (!$relayMode) { - return $uids; - } } $search = ''; @@ -354,15 +299,4 @@ class UserDefinedChannel extends BaseRepository } return $condition; } - - private function getUserCondition() - { - $condition = ["`verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired` AND `user`.`uid` > ?", 0]; - - $abandon_days = intval($this->config->get('system', 'account_abandon_days')); - if (!empty($abandon_days)) { - $condition = DBA::mergeConditions($condition, ["`last-activity` > ?", DateTimeFormat::utc('now - ' . $abandon_days . ' days')]); - } - return $condition; - } } -- 2.39.5