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`
This commit is contained in:
Alexandre Alapetite authored and GitHub committed 2025-06-29 11:09:08 +02:00
1 parent 7c57f38008
commit c8bbf35534
6 files changed
+83

No files matched your search

+5
View File
@@ -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" .