aboutsummaryrefslogtreecommitdiff
path: root/app/Models/EntryDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-09-30 10:05:17 +0200
committerGravatar GitHub <noreply@github.com> 2025-09-30 10:05:17 +0200
commit34532c0dd49f825ca4f265db9dec446ec0ecd34f (patch)
tree365e6776b93c3e2d91b814e8db6fe0d4fcbdcf22 /app/Models/EntryDAO.php
parent11e6e0394c9e617a56ac29afc7a341f19ac6662d (diff)
Add new visibility priority *Show in its feed* (#7972)
* Add new visibility priority *Show in its feed* fix https://github.com/FreshRSS/FreshRSS/pull/7970#issuecomment-3293917428 (you can't directly filter a hidden feed, it just shows a 404 page) And add a new visibility *Show in its feed* to show the feed in the list but not its articles. Ensure that visibility *hidden* is not shown to API. * TODO for later * Update app/i18n/pl/sub.php Co-authored-by: Inverle <inverle@proton.me>
Diffstat (limited to 'app/Models/EntryDAO.php')
-rw-r--r--app/Models/EntryDAO.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index ec3bde412..ad1cc4393 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -571,9 +571,9 @@ SQL;
UPDATE `_entry`
SET is_read = ?
WHERE is_read <> ? AND id <= ?
-AND id_feed IN (SELECT f.id FROM `_feed` f WHERE f.category=?)
+AND id_feed IN (SELECT f.id FROM `_feed` f WHERE f.category=? AND f.priority >= ?)
SQL;
- $values = [$is_read ? 1 : 0, $is_read ? 1 : 0, $idMax, $id];
+ $values = [$is_read ? 1 : 0, $is_read ? 1 : 0, $idMax, $id, FreshRSS_Feed::PRIORITY_CATEGORY];
[$searchValues, $search] = $this->sqlListEntriesWhere(alias: '', state: $state, filters: $filters);
@@ -1340,7 +1340,7 @@ SQL;
$where .= 'f.priority >= ' . FreshRSS_Feed::PRIORITY_MAIN_STREAM . ' ';
break;
case 'A': // All except PRIORITY_HIDDEN
- $where .= 'f.priority >= ' . FreshRSS_Feed::PRIORITY_CATEGORY . ' ';
+ $where .= 'f.priority >= ' . FreshRSS_Feed::PRIORITY_FEED . ' ';
break;
case 'Z': // All including PRIORITY_HIDDEN
$where .= 'f.priority >= ' . FreshRSS_Feed::PRIORITY_HIDDEN . ' ';