From: Michael Date: Thu, 11 Jan 2024 20:40:24 +0000 (+0000) Subject: Simplify SQL check X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2063d2bf0d88dc9ea68a1b66318ff670a7da6b79;p=friendica.git Simplify SQL check --- diff --git a/src/Content/Conversation/Repository/UserDefinedChannel.php b/src/Content/Conversation/Repository/UserDefinedChannel.php index e11a7d0abe..a74bdb06d3 100644 --- a/src/Content/Conversation/Repository/UserDefinedChannel.php +++ b/src/Content/Conversation/Repository/UserDefinedChannel.php @@ -156,10 +156,7 @@ class UserDefinedChannel extends \Friendica\BaseRepository return true; } - $this->db->insert('check-full-text-search', ['pid' => getmypid(), 'searchtext' => $searchtext], Database::INSERT_UPDATE); - $result = $this->db->select('check-full-text-search', [], ["`pid` = ? AND MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", getmypid(), $this->escapeKeywords($searchtext)]); - $this->db->delete('check-full-text-search', ['pid' => getmypid()]); - return $result !== false; + return $this->db->select('check-full-text-search', [], ["`pid` = ? AND MATCH (`searchtext`) AGAINST (? IN BOOLEAN MODE)", getmypid(), $this->escapeKeywords($searchtext)]) !== false; } /**