aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-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
34 files changed, 42 insertions, 7 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 = '';