From c8bbf355342985c83054c6c36c6538a780ab509e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 29 Jun 2025 11:09:08 +0200 Subject: Add search operator `c:` for categories (#7696) * Add search operator `c:` for categories fix https://github.com/FreshRSS/FreshRSS/discussions/7692 Allow searching for e.g. `c:23,34` --- tests/app/Models/SearchTest.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php index a62e255de..1e8855aa3 100644 --- a/tests/app/Models/SearchTest.php +++ b/tests/app/Models/SearchTest.php @@ -366,6 +366,11 @@ class SearchTest extends PHPUnit\Framework\TestCase { ' (((e.id_feed IN (?) )) OR ((e.id_feed IN (?) ) OR (e.id_feed IN (?) ))) ', [1, 2, 3, 4, 5, 6, 7] ], + [ + 'c:1 OR c:2,3', + ' (e.id_feed IN (SELECT f.id FROM `_feed` f WHERE f.category IN (?)) ) OR (e.id_feed IN (SELECT f.id FROM `_feed` f WHERE f.category IN (?,?)) ) ', + [1, 2, 3] + ], [ '#tag Hello OR (author:Alice inurl:example) OR (f:3 intitle:World) OR L:12', " ((TRIM(e.tags) || ' #' LIKE ? AND (e.title LIKE ? OR e.content LIKE ?) )) OR ((e.author LIKE ? AND e.link LIKE ? )) OR" . -- cgit v1.2.3