Merge branch 'search-by-tags' into 'master'

allow searching by tags (prefix tag:)

See merge request tt-rss/tt-rss!154
This commit is contained in:
wn 2025-06-23 11:17:52 -05:00
commit 18f8f55ce5

View File

@ -2232,6 +2232,18 @@ class Feeds extends Handler_Protected {
if (!$not) array_push($search_words, $k);
}
break;
case "tag":
if ($keyword_value) {
array_push($query_keywords, "($not
(ttrss_user_entries.int_id IN (
SELECT post_int_id FROM ttrss_tags WHERE
tag_name = ".$pdo->quote($keyword_value).")))");
} else {
array_push($query_keywords, "(UPPER(ttrss_entries.title) $not LIKE UPPER(".$pdo->quote("%$k%").")
OR UPPER(ttrss_entries.content) $not LIKE UPPER(".$pdo->quote("%$k%")."))");
if (!$not) array_push($search_words, $k);
}
break;
case "unread":
if ($keyword_value) {
if ($keyword_value == "true")