aboutsummaryrefslogtreecommitdiff
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
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>
-rw-r--r--app/Models/CategoryDAO.php4
-rw-r--r--app/Models/Context.php3
-rw-r--r--app/Models/EntryDAO.php6
-rw-r--r--app/Models/Feed.php1
-rw-r--r--app/i18n/cs/sub.php1
-rw-r--r--app/i18n/de/sub.php1
-rw-r--r--app/i18n/el/sub.php1
-rw-r--r--app/i18n/en-us/sub.php1
-rw-r--r--app/i18n/en/sub.php1
-rw-r--r--app/i18n/es/sub.php1
-rw-r--r--app/i18n/fa/sub.php1
-rw-r--r--app/i18n/fi/sub.php1
-rw-r--r--app/i18n/fr/sub.php1
-rw-r--r--app/i18n/he/sub.php1
-rw-r--r--app/i18n/hu/sub.php1
-rw-r--r--app/i18n/id/sub.php1
-rw-r--r--app/i18n/it/sub.php1
-rw-r--r--app/i18n/ja/sub.php1
-rw-r--r--app/i18n/ko/sub.php1
-rw-r--r--app/i18n/lv/sub.php1
-rw-r--r--app/i18n/nl/sub.php1
-rw-r--r--app/i18n/oc/sub.php1
-rw-r--r--app/i18n/pl/sub.php1
-rw-r--r--app/i18n/pt-br/sub.php1
-rw-r--r--app/i18n/pt-pt/sub.php1
-rw-r--r--app/i18n/ru/sub.php1
-rw-r--r--app/i18n/sk/sub.php1
-rw-r--r--app/i18n/tr/sub.php1
-rw-r--r--app/i18n/uk/sub.php1
-rw-r--r--app/i18n/zh-cn/sub.php1
-rw-r--r--app/i18n/zh-tw/sub.php1
-rw-r--r--app/layout/aside_feed.phtml3
-rw-r--r--app/views/helpers/feed/update.phtml2
-rw-r--r--app/views/index/global.phtml3
-rw-r--r--docs/i18n/flags/gen/cs.svg2
-rw-r--r--docs/i18n/flags/gen/de.svg2
-rw-r--r--docs/i18n/flags/gen/hu.svg2
-rw-r--r--docs/i18n/flags/gen/it.svg2
-rw-r--r--docs/i18n/flags/gen/ko.svg2
-rw-r--r--docs/i18n/flags/gen/nl.svg2
-rw-r--r--docs/i18n/flags/gen/ru.svg2
-rw-r--r--docs/i18n/flags/gen/tr.svg2
-rw-r--r--docs/i18n/flags/gen/uk.svg2
-rw-r--r--docs/i18n/flags/gen/zh-tw.svg2
-rw-r--r--p/api/fever.php14
-rw-r--r--p/api/greader.php8
46 files changed, 72 insertions, 19 deletions
diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php
index 4c88e6b65..5520c39d6 100644
--- a/app/Models/CategoryDAO.php
+++ b/app/Models/CategoryDAO.php
@@ -302,12 +302,10 @@ SQL;
. ($details ? 'f.* ' : 'f.id, f.name, f.url, f.kind, f.website, f.priority, f.error, f.attributes, f.`cache_nbEntries`, f.`cache_nbUnreads`, f.ttl ')
. 'FROM `_category` c '
. 'LEFT OUTER JOIN `_feed` f ON f.category=c.id '
- . 'WHERE f.priority >= :priority '
. 'GROUP BY f.id, c_id '
. 'ORDER BY c.name, f.name';
$stm = $this->pdo->prepare($sql);
- $values = [ ':priority' => FreshRSS_Feed::PRIORITY_CATEGORY ];
- if ($stm !== false && $stm->execute($values) && ($res = $stm->fetchAll(PDO::FETCH_ASSOC)) !== false) {
+ if ($stm !== false && $stm->execute() && ($res = $stm->fetchAll(PDO::FETCH_ASSOC)) !== false) {
/** @var list<array{c_name:string,c_id:int,c_kind:int,c_last_update:int,c_error:int,c_attributes?:string,
* id?:int,name?:string,url?:string,kind?:int,category?:int,website?:string,priority?:int,error?:int,attributes?:string,cache_nbEntries?:int,cache_nbUnreads?:int,ttl?:int}> $res */
return self::daoToCategoriesPrepopulated($res);
diff --git a/app/Models/Context.php b/app/Models/Context.php
index efe36f0e2..1dccff6f6 100644
--- a/app/Models/Context.php
+++ b/app/Models/Context.php
@@ -400,11 +400,12 @@ final class FreshRSS_Context {
* @throws Minz_ConfigurationNamespaceException
* @throws Minz_PDOConnectionException
*/
- public static function _get(string $get): void {
+ private static function _get(string $get): void {
$type = $get[0];
$id = (int)substr($get, 2);
if (empty(self::$categories)) {
+ // TODO: Check whether this section is used
$catDAO = FreshRSS_Factory::createCategoryDao();
$details = $type === 'f'; // Load additional feed details in the case of feed view
self::$categories = $catDAO->listCategories(prePopulateFeeds: true, details: $details);
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 . ' ';
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index e368a6807..2b29f7b22 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -38,6 +38,7 @@ class FreshRSS_Feed extends Minz_Model {
public const PRIORITY_IMPORTANT = 20;
public const PRIORITY_MAIN_STREAM = 10;
public const PRIORITY_CATEGORY = 0;
+ public const PRIORITY_FEED = -5;
public const PRIORITY_HIDDEN = -10;
/** @deprecated use PRIORITY_HIDDEN instead */
public const PRIORITY_ARCHIVED = -10;
diff --git a/app/i18n/cs/sub.php b/app/i18n/cs/sub.php
index 9f18b92df..5f6e16a8e 100644
--- a/app/i18n/cs/sub.php
+++ b/app/i18n/cs/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Viditelnost',
'category' => 'Zobrazit v jeho kategorii',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Nezobrazovat',
'important' => 'Zobrazit v důležitých kanálech',
'main_stream' => 'Zobrazit ve hlavním kanálu',
diff --git a/app/i18n/de/sub.php b/app/i18n/de/sub.php
index 56bd6af7c..d8ae79dc7 100644
--- a/app/i18n/de/sub.php
+++ b/app/i18n/de/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Sichtbarkeit',
'category' => 'Zeige in eigener Kategorie',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Nicht anzeigen',
'important' => 'Zeige in "Wichtige Feeds"',
'main_stream' => 'In Haupt-Feeds zeigen',
diff --git a/app/i18n/el/sub.php b/app/i18n/el/sub.php
index d4ba8a932..27641d131 100644
--- a/app/i18n/el/sub.php
+++ b/app/i18n/el/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibility', // TODO
'category' => 'Show in its category', // TODO
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Do not show', // TODO
'important' => 'Show in important feeds', // TODO
'main_stream' => 'Show in main stream', // TODO
diff --git a/app/i18n/en-us/sub.php b/app/i18n/en-us/sub.php
index 5a201c2b7..b3c4042ee 100644
--- a/app/i18n/en-us/sub.php
+++ b/app/i18n/en-us/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibility', // IGNORE
'category' => 'Show in its category', // IGNORE
+ 'feed' => 'Show in its feed', // IGNORE
'hidden' => 'Do not show', // IGNORE
'important' => 'Show in important feeds', // IGNORE
'main_stream' => 'Show in main stream', // IGNORE
diff --git a/app/i18n/en/sub.php b/app/i18n/en/sub.php
index f1f2fe694..006a9a190 100644
--- a/app/i18n/en/sub.php
+++ b/app/i18n/en/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibility',
'category' => 'Show in its category',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Do not show',
'important' => 'Show in important feeds',
'main_stream' => 'Show in main stream',
diff --git a/app/i18n/es/sub.php b/app/i18n/es/sub.php
index 739eb69cf..f5addbd74 100644
--- a/app/i18n/es/sub.php
+++ b/app/i18n/es/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibilidad',
'category' => 'Mostrar en su categoría',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'No mostrar',
'important' => 'Mostrar en fuentes importantes',
'main_stream' => 'Mostrar en salida principal',
diff --git a/app/i18n/fa/sub.php b/app/i18n/fa/sub.php
index 58df6d939..48034f38c 100644
--- a/app/i18n/fa/sub.php
+++ b/app/i18n/fa/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => ' دید',
'category' => ' نمایش در دسته بندی خود',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'نشان ندهید.',
'important' => 'نمایش در فیدهای مهم',
'main_stream' => ' نمایش در جریان اصلی',
diff --git a/app/i18n/fi/sub.php b/app/i18n/fi/sub.php
index 1401c8d0f..7541a4081 100644
--- a/app/i18n/fi/sub.php
+++ b/app/i18n/fi/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Näkyvyys',
'category' => 'Näytä luokassaan',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Älä näytä',
'important' => 'Näytä tärkeissä syötteissä',
'main_stream' => 'Näytä pääsyötevirrassa',
diff --git a/app/i18n/fr/sub.php b/app/i18n/fr/sub.php
index e8d9fe298..9630cc8b6 100644
--- a/app/i18n/fr/sub.php
+++ b/app/i18n/fr/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibilité',
'category' => 'Afficher dans sa catégorie',
+ 'feed' => 'Afficher dans son flux',
'hidden' => 'Ne pas afficher',
'important' => 'Afficher dans les flux importants',
'main_stream' => 'Afficher dans les flux principaux',
diff --git a/app/i18n/he/sub.php b/app/i18n/he/sub.php
index 0c881d2f4..eb3e16f8a 100644
--- a/app/i18n/he/sub.php
+++ b/app/i18n/he/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibility', // TODO
'category' => 'Show in its category', // TODO
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Do not show', // TODO
'important' => 'Show in important feeds', // TODO
'main_stream' => 'הצגה בזרם המרכזי',
diff --git a/app/i18n/hu/sub.php b/app/i18n/hu/sub.php
index 089c27131..ce8b195f7 100644
--- a/app/i18n/hu/sub.php
+++ b/app/i18n/hu/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Láthatóság',
'category' => 'Jelenjen meg a saját kategóriájában',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Ne jelenjen meg',
'important' => 'Megjelenítés a fontos hírforrásokban',
'main_stream' => 'Megjelenítés a Minden cikk között',
diff --git a/app/i18n/id/sub.php b/app/i18n/id/sub.php
index 1703a94bb..a03b6bb59 100644
--- a/app/i18n/id/sub.php
+++ b/app/i18n/id/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Ketampakan',
'category' => 'Tampilkan hanya di kategorinya saja',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Jangan tampilkan',
'important' => 'Tampilkan di umpan penting',
'main_stream' => 'Tampilkan di bagian utama',
diff --git a/app/i18n/it/sub.php b/app/i18n/it/sub.php
index 415c31826..e0d4be072 100644
--- a/app/i18n/it/sub.php
+++ b/app/i18n/it/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibilità',
'category' => 'Mostra nella sua categoria',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Non mostrare',
'important' => 'Mostra nei feed importanti',
'main_stream' => 'Mostra in homepage',
diff --git a/app/i18n/ja/sub.php b/app/i18n/ja/sub.php
index 830cb787c..eafb9cbb6 100644
--- a/app/i18n/ja/sub.php
+++ b/app/i18n/ja/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => '表示する場所',
'category' => 'カテゴリで表示する',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => '非表示にする',
'important' => '重要なフィードに表示する',
'main_stream' => 'メインストリームで表示する',
diff --git a/app/i18n/ko/sub.php b/app/i18n/ko/sub.php
index 3f9a367ba..6e0234c38 100644
--- a/app/i18n/ko/sub.php
+++ b/app/i18n/ko/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => '표시',
'category' => '피드가 속한 카테고리에만 표시하기',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => '표시하지 않음',
'important' => '중요 피드에서 표시',
'main_stream' => '메인 스트림에 표시하기',
diff --git a/app/i18n/lv/sub.php b/app/i18n/lv/sub.php
index b5fc35e06..4f0bee742 100644
--- a/app/i18n/lv/sub.php
+++ b/app/i18n/lv/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Prioritāte',
'category' => 'Rādīt kategorijā',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Nerādīt',
'important' => 'Show in important feeds', // TODO
'main_stream' => 'Rādīt galvenajā plūsmā',
diff --git a/app/i18n/nl/sub.php b/app/i18n/nl/sub.php
index 6854f8c6a..17e8a1ad2 100644
--- a/app/i18n/nl/sub.php
+++ b/app/i18n/nl/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Zichtbaarheid',
'category' => 'Toon in categorie',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Niet weergeven',
'important' => 'In belangrijke feeds tonen',
'main_stream' => 'Zichtbaar in het overzicht',
diff --git a/app/i18n/oc/sub.php b/app/i18n/oc/sub.php
index 580388927..108e3caed 100644
--- a/app/i18n/oc/sub.php
+++ b/app/i18n/oc/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibilitat',
'category' => 'Mostar dins sa categoria',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Mostrar pas',
'important' => 'Show in important feeds', // TODO
'main_stream' => 'Mostar al flux màger',
diff --git a/app/i18n/pl/sub.php b/app/i18n/pl/sub.php
index abc064e78..415bf67ac 100644
--- a/app/i18n/pl/sub.php
+++ b/app/i18n/pl/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Widoczność',
'category' => 'Pokaż w kategorii kanału',
+ 'feed' => 'Pokaż w kanale',
'hidden' => 'Nie pokazuj',
'important' => 'Pokaż w ważnych kanałach',
'main_stream' => 'Pokaż w kanale głównym',
diff --git a/app/i18n/pt-br/sub.php b/app/i18n/pt-br/sub.php
index 36ec8de00..829b21660 100644
--- a/app/i18n/pt-br/sub.php
+++ b/app/i18n/pt-br/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibilidade',
'category' => 'Mostrar na sua categoria',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Não exibir',
'important' => 'Mostrar feeds importantes',
'main_stream' => 'Mostrar na tela principal',
diff --git a/app/i18n/pt-pt/sub.php b/app/i18n/pt-pt/sub.php
index 64411a101..dcedaeee8 100644
--- a/app/i18n/pt-pt/sub.php
+++ b/app/i18n/pt-pt/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Visibilidade',
'category' => 'Mostrar na sua categoria',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Não exibir',
'important' => 'Mostrar feeds importantes',
'main_stream' => 'Mostrar na tela principal',
diff --git a/app/i18n/ru/sub.php b/app/i18n/ru/sub.php
index af7fac6cb..e0ff935cd 100644
--- a/app/i18n/ru/sub.php
+++ b/app/i18n/ru/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Видимость',
'category' => 'Показывать в категории ленты',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Не показывать',
'important' => 'Показывать в важных лентах',
'main_stream' => 'Показывать в основном потоке',
diff --git a/app/i18n/sk/sub.php b/app/i18n/sk/sub.php
index 56558b7d1..25db456eb 100644
--- a/app/i18n/sk/sub.php
+++ b/app/i18n/sk/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Viditeľnosť',
'category' => 'Zobraziť vo svojej kategórii',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Nezobrazovať',
'important' => 'Zobraziť v dôležitých kanáloch',
'main_stream' => 'Zobraziť v prehľade kanálov',
diff --git a/app/i18n/tr/sub.php b/app/i18n/tr/sub.php
index 38907effc..b44c8df00 100644
--- a/app/i18n/tr/sub.php
+++ b/app/i18n/tr/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Görünürlük',
'category' => 'Kategorisinde göster',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Gösterilmesin',
'important' => 'Önemli beslemelerde göster',
'main_stream' => 'Ana akışta göster',
diff --git a/app/i18n/uk/sub.php b/app/i18n/uk/sub.php
index 37aa191cc..e7d2769d0 100644
--- a/app/i18n/uk/sub.php
+++ b/app/i18n/uk/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => 'Видимість',
'category' => 'Показати в категорії',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => 'Не показувати',
'important' => 'Показати у важливих стрічках',
'main_stream' => 'Показати в головному потоці',
diff --git a/app/i18n/zh-cn/sub.php b/app/i18n/zh-cn/sub.php
index d5908405a..4769893d5 100644
--- a/app/i18n/zh-cn/sub.php
+++ b/app/i18n/zh-cn/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => '可见性',
'category' => '在分类中显示',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => '不显示',
'important' => '在“重要的订阅”中显示',
'main_stream' => '在首页中显示',
diff --git a/app/i18n/zh-tw/sub.php b/app/i18n/zh-tw/sub.php
index 9f744511e..836de4795 100644
--- a/app/i18n/zh-tw/sub.php
+++ b/app/i18n/zh-tw/sub.php
@@ -210,6 +210,7 @@ return array(
'priority' => array(
'_' => '可見性',
'category' => '在分類中顯示',
+ 'feed' => 'Show in its feed', // TODO
'hidden' => '不顯示',
'important' => '顯示在重要的源',
'main_stream' => '在首頁中顯示',
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index 37ae379ed..b3c3d1c86 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -111,6 +111,9 @@
foreach ($feeds as $feed):
$f_active = FreshRSS_Context::isCurrentGet('f_' . $feed->id());
+ if (!$f_active && $feed->priority() < FreshRSS_Feed::PRIORITY_FEED) {
+ continue;
+ }
$f_active_class = $f_active ? ' active' : '';
$error_class = '';
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index f6419e301..0666a7130 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -121,6 +121,8 @@
FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority() ? 'selected="selected"' : '' ?>><?= _t('sub.feed.priority.main_stream') ?></option>
<option value="<?= FreshRSS_Feed::PRIORITY_CATEGORY ?>" <?=
FreshRSS_Feed::PRIORITY_CATEGORY === $this->feed->priority() ? 'selected="selected"' : '' ?>><?= _t('sub.feed.priority.category') ?></option>
+ <option value="<?= FreshRSS_Feed::PRIORITY_FEED ?>" <?=
+ FreshRSS_Feed::PRIORITY_FEED === $this->feed->priority() ? 'selected="selected"' : '' ?>><?= _t('sub.feed.priority.feed') ?></option>
<option value="<?= FreshRSS_Feed::PRIORITY_HIDDEN ?>" <?=
FreshRSS_Feed::PRIORITY_HIDDEN === $this->feed->priority() ? 'selected="selected"' : '' ?>><?= _t('sub.feed.priority.hidden') ?></option>
</select>
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml
index a5af83412..1ad92d2fc 100644
--- a/app/views/index/global.phtml
+++ b/app/views/index/global.phtml
@@ -64,6 +64,9 @@
<ul class="box-content scrollbar-thin">
<?php
foreach ($feeds as $feed) {
+ if ($feed->priority() < FreshRSS_Feed::PRIORITY_FEED) {
+ continue;
+ }
$nb_not_read = $feed->nbNotRead();
$error_class = '';
diff --git a/docs/i18n/flags/gen/cs.svg b/docs/i18n/flags/gen/cs.svg
index dba66087d..638de7e04 100644
--- a/docs/i18n/flags/gen/cs.svg
+++ b/docs/i18n/flags/gen/cs.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="gold" />
- <text x="34" y="14">🇨🇿 89%</text>
+ <text x="34" y="14">🇨🇿 88%</text>
</g>
</svg> \ No newline at end of file
diff --git a/docs/i18n/flags/gen/de.svg b/docs/i18n/flags/gen/de.svg
index b2b7ffd02..3d73ff3d1 100644
--- a/docs/i18n/flags/gen/de.svg
+++ b/docs/i18n/flags/gen/de.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="green" />
- <text x="34" y="14">🇩🇪 100%</text>
+ <text x="34" y="14">🇩🇪 99%</text>
</g>
</svg> \ No newline at end of file
diff --git a/docs/i18n/flags/gen/hu.svg b/docs/i18n/flags/gen/hu.svg
index 62fb19a2e..d09d601e5 100644
--- a/docs/i18n/flags/gen/hu.svg
+++ b/docs/i18n/flags/gen/hu.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="green" />
- <text x="34" y="14">🇭🇺 100%</text>
+ <text x="34" y="14">🇭🇺 99%</text>
</g>
</svg> \ No newline at end of file
diff --git a/docs/i18n/flags/gen/it.svg b/docs/i18n/flags/gen/it.svg
index 7c5dda104..8b62b3a77 100644
--- a/docs/i18n/flags/gen/it.svg
+++ b/docs/i18n/flags/gen/it.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="green" />
- <text x="34" y="14">🇮🇹 97%</text>
+ <text x="34" y="14">🇮🇹 96%</text>
</g>
</svg> \ No newline at end of file
diff --git a/docs/i18n/flags/gen/ko.svg b/docs/i18n/flags/gen/ko.svg
index bde6a488c..9939c5484 100644
--- a/docs/i18n/flags/gen/ko.svg
+++ b/docs/i18n/flags/gen/ko.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="gold" />
- <text x="34" y="14">🇰🇷 89%</text>
+ <text x="34" y="14">🇰🇷 88%</text>
</g>
</svg> \ No newline at end of file
diff --git a/docs/i18n/flags/gen/nl.svg b/docs/i18n/flags/gen/nl.svg
index c4a90a857..b1330d183 100644
--- a/docs/i18n/flags/gen/nl.svg
+++ b/docs/i18n/flags/gen/nl.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="green" />
- <text x="34" y="14">🇳🇱 100%</text>
+ <text x="34" y="14">🇳🇱 99%</text>
</g>
</svg> \ No newline at end of file
diff --git a/docs/i18n/flags/gen/ru.svg b/docs/i18n/flags/gen/ru.svg
index 01426a5df..24766b4b2 100644
--- a/docs/i18n/flags/gen/ru.svg
+++ b/docs/i18n/flags/gen/ru.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="gold" />
- <text x="34" y="14">🇷🇺 89%</text>
+ <text x="34" y="14">🇷🇺 88%</text>
</g>
</svg> \ No newline at end of file
diff --git a/docs/i18n/flags/gen/tr.svg b/docs/i18n/flags/gen/tr.svg
index c298e0e09..bad76bc56 100644
--- a/docs/i18n/flags/gen/tr.svg
+++ b/docs/i18n/flags/gen/tr.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="green" />
- <text x="34" y="14">🇹🇷 97%</text>
+ <text x="34" y="14">🇹🇷 96%</text>
</g>
</svg> \ No newline at end of file
diff --git a/docs/i18n/flags/gen/uk.svg b/docs/i18n/flags/gen/uk.svg
index c59c7a9e9..1b1a583ed 100644
--- a/docs/i18n/flags/gen/uk.svg
+++ b/docs/i18n/flags/gen/uk.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="green" />
- <text x="34" y="14">🇺🇦 100%</text>
+ <text x="34" y="14">🇺🇦 99%</text>
</g>
</svg> \ No newline at end of file
diff --git a/docs/i18n/flags/gen/zh-tw.svg b/docs/i18n/flags/gen/zh-tw.svg
index 18374e310..e171cdce4 100644
--- a/docs/i18n/flags/gen/zh-tw.svg
+++ b/docs/i18n/flags/gen/zh-tw.svg
@@ -2,6 +2,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="70" height="20">
<g fill="white" font-size="12" font-family="Verdana" text-anchor="middle">
<rect rx="3" width="70" height="20" fill="gold" />
- <text x="34" y="14">🇹🇼 89%</text>
+ <text x="34" y="14">🇹🇼 88%</text>
</g>
</svg> \ No newline at end of file
diff --git a/p/api/fever.php b/p/api/fever.php
index 01e6d7b61..420a17f64 100644
--- a/p/api/fever.php
+++ b/p/api/fever.php
@@ -317,6 +317,9 @@ final class FeverAPI
/** @var FreshRSS_Feed $feed */
foreach ($myFeeds as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$feeds[] = [
'id' => $feed->id(),
'favicon_id' => $feed->id(),
@@ -362,6 +365,9 @@ final class FeverAPI
$myFeeds = $this->feedDAO->listFeeds();
foreach ($myFeeds as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$id = $feed->hashFavicon();
$filename = DATA_PATH . '/favicons/' . $id . '.ico';
if (!file_exists($filename)) {
@@ -390,6 +396,9 @@ final class FeverAPI
$myFeeds = $this->feedDAO->listFeeds();
foreach ($myFeeds as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$ids[$feed->categoryId()][] = $feed->id();
}
@@ -471,10 +480,13 @@ final class FeverAPI
$feeds = [];
foreach ($group_ids as $id) {
$category = $categoryDAO->searchById((int)$id); //TODO: Transform to SQL query without loop! Consider FreshRSS_CategoryDAO::listCategories(true)
- if ($category == null) {
+ if ($category === null) {
continue;
}
foreach ($category->feeds() as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$feeds[] = $feed->id();
}
}
diff --git a/p/api/greader.php b/p/api/greader.php
index b983bfa90..6b67a7451 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -340,6 +340,9 @@ final class GReaderAPI {
$categoryDAO = FreshRSS_Factory::createCategoryDao();
foreach ($categoryDAO->listCategories(prePopulateFeeds: true, details: true) as $cat) {
foreach ($cat->feeds() as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$subscriptions[] = [
'id' => 'feed/' . $feed->id(),
'title' => escapeToUnicodeAlternative($feed->name(), true),
@@ -502,6 +505,9 @@ final class GReaderAPI {
foreach ($categoryDAO->listCategories(prePopulateFeeds: true, details: true) as $cat) {
$catLastUpdate = 0;
foreach ($cat->feeds() as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$lastUpdate = $feedsNewestItemUsec['f_' . $feed->id()] ?? 0;
$unreadcounts[] = [
'id' => 'feed/' . $feed->id(),
@@ -662,7 +668,7 @@ final class GReaderAPI {
'starred' => 's',
'feed' => 'f',
'label' => 'c',
- 'reading-list' => 'A',
+ 'reading-list' => 'A', // All except PRIORITY_HIDDEN
default => 'A',
};