New automatic feed visibility/priority during search (#8609)

When the search query includes some feed IDs or category IDs, adjust feed visibility/priority filter to include at minimum feed or category visibility.
Fix: https://github.com/FreshRSS/FreshRSS/issues/8602
This commit is contained in:
Alexandre Alapetite
2026-03-21 17:15:07 +01:00
committed by GitHub
parent b19060aa1f
commit 1b90c40fd6
8 changed files with 123 additions and 51 deletions

View File

@@ -154,28 +154,28 @@ class FreshRSS_UserQuery {
case 'Z': // All including PRIORITY_HIDDEN
$this->get_type = 'Z';
break;
case 'c':
case 'c': // Category
$this->get_type = 'category';
$c = $this->categories[$id] ?? null;
$this->get_name = $c === null ? '' : $c->name();
break;
case 'f':
case 'f': // Feed
$this->get_type = 'feed';
$f = FreshRSS_Category::findFeed($this->categories, $id);
$this->get_name = $f === null ? '' : $f->name();
break;
case 'i':
case 'i': // Priority important feeds
$this->get_type = 'important';
break;
case 's':
case 's': // Starred. Deprecated: use $state instead
$this->get_type = 'favorite';
break;
case 't':
case 't': // Tag (label)
$this->get_type = 'label';
$l = $this->labels[$id] ?? null;
$this->get_name = $l === null ? '' : $l->name();
break;
case 'T':
case 'T': // Any tag (label)
$this->get_type = 'all_labels';
break;
}