aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Tommaso Ferrari <raspaccio@gmail.com> 2025-10-22 12:28:33 -0700
committerGravatar GitHub <noreply@github.com> 2025-10-22 21:28:33 +0200
commit581b81006af157d0fa12b8d1e2604c637234f778 (patch)
treea75de00520a304e27296e4c6b5b6bf2116f1ae69 /app
parent1282d3a2709064cb847b8757409a7153449faa9d (diff)
Add option to apply filter actions to existing articles (#7959)
* Add option to apply filter actions to existing articles * make fix-all * Fixes * Another approach with preview New approach: https://github.com/FreshRSS/FreshRSS/pull/7959/commits/20479475c90ac954b991b3703c3cc76c16aa2d5c <img width="666" height="202" alt="image" src="https://github.com/user-attachments/assets/bb68ede4-60c8-4e0c-9317-c5ed7a6ad7df" /> Additional improvements: * Also implemented at category level, and at global level * Also implemented for favourites at global level Shortcomings: * Does not always work reliably with advanced regex, since the DB's flavour is not necessarily the same than PHP's Related: https://github.com/FreshRSS/FreshRSS/pull/8141 * make fix-all --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/categoryController.php24
-rw-r--r--app/Controllers/configureController.php19
-rw-r--r--app/Controllers/subscriptionController.php24
-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/views/configure/reading.phtml10
-rw-r--r--app/views/helpers/category/update.phtml5
-rw-r--r--app/views/helpers/feed/update.phtml5
33 files changed, 114 insertions, 0 deletions
diff --git a/app/Controllers/categoryController.php b/app/Controllers/categoryController.php
index 5ad83e977..2212a158b 100644
--- a/app/Controllers/categoryController.php
+++ b/app/Controllers/categoryController.php
@@ -171,6 +171,30 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
}
}
+ public function viewFilterAction(): void {
+ $id = Minz_Request::paramInt('id');
+ if ($id === 0) {
+ Minz_Error::error(400);
+ return;
+ }
+ $filteractions = Minz_Request::paramTextToArray('filteractions_read');
+ $filteractions = array_map(fn(string $action): string => trim($action), $filteractions);
+ $filteractions = array_filter($filteractions, fn(string $action): bool => $action !== '');
+ $search = "c:$id (";
+ foreach ($filteractions as $action) {
+ $search .= "($action) OR ";
+ }
+ $search = preg_replace('/ OR $/', '', $search);
+ $search .= ')';
+ Minz_Request::forward([
+ 'c' => 'index',
+ 'a' => 'index',
+ 'params' => [
+ 'search' => $search,
+ ],
+ ], redirect: true);
+ }
+
/**
* This action deletes a category.
* Feeds in the given category are moved in the default category.
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index 427fcb584..17c6c20bd 100644
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -180,6 +180,25 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
FreshRSS_View::prependTitle(_t('conf.reading.title') . ' · ');
}
+ public function viewFilterAction(): void {
+ $search = '';
+ $filters_name = Minz_Request::paramString('filters_name', plaintext: true);
+ $filteractions = Minz_Request::paramTextToArray($filters_name);
+ $filteractions = array_map(fn(string $action): string => trim($action), $filteractions);
+ $filteractions = array_filter($filteractions, fn(string $action): bool => $action !== '');
+ foreach ($filteractions as $action) {
+ $search .= "($action) OR ";
+ }
+ $search = preg_replace('/ OR $/', '', $search);
+ Minz_Request::forward([
+ 'c' => 'index',
+ 'a' => 'index',
+ 'params' => [
+ 'search' => $search,
+ ],
+ ], redirect: true);
+ }
+
/**
* This action handles the integration configuration page.
*
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php
index ccd421a41..244a16671 100644
--- a/app/Controllers/subscriptionController.php
+++ b/app/Controllers/subscriptionController.php
@@ -409,6 +409,30 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
}
}
+ public function viewFilterAction(): void {
+ $id = Minz_Request::paramInt('id');
+ if ($id === 0) {
+ Minz_Error::error(400);
+ return;
+ }
+ $filteractions = Minz_Request::paramTextToArray('filteractions_read');
+ $filteractions = array_map(fn(string $action): string => trim($action), $filteractions);
+ $filteractions = array_filter($filteractions, fn(string $action): bool => $action !== '');
+ $search = "f:$id (";
+ foreach ($filteractions as $action) {
+ $search .= "($action) OR ";
+ }
+ $search = preg_replace('/ OR $/', '', $search);
+ $search .= ')';
+ Minz_Request::forward([
+ 'c' => 'index',
+ 'a' => 'index',
+ 'params' => [
+ 'search' => $search,
+ ],
+ ], redirect: true);
+ }
+
/**
* This action displays the bookmarklet page.
*/
diff --git a/app/i18n/cs/sub.php b/app/i18n/cs/sub.php
index cbf997322..9c8e16363 100644
--- a/app/i18n/cs/sub.php
+++ b/app/i18n/cs/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Akce filtrování',
'help' => 'Zapište jeden filtr hledání na řádek. Operátoři <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">viz dokumentace</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/de/sub.php b/app/i18n/de/sub.php
index 5fbfdae21..0d6646812 100644
--- a/app/i18n/de/sub.php
+++ b/app/i18n/de/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filteraktionen',
'help' => 'Ein Suchfilter pro Zeile. Operatoren <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">siehe Dokumentation</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // IGNORE
'http_headers_help' => 'Headers werden durch einen Zeilenumbruch getrennt. Name und Wert des Headers werden per Doppelpunkt getrennt (z.B: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/el/sub.php b/app/i18n/el/sub.php
index a9ba689e9..ed6b332ea 100644
--- a/app/i18n/el/sub.php
+++ b/app/i18n/el/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filter actions', // TODO
'help' => 'Write one search filter per line. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // TODO
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/en-US/sub.php b/app/i18n/en-US/sub.php
index 8f458095f..5d12dacae 100644
--- a/app/i18n/en-US/sub.php
+++ b/app/i18n/en-US/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filter actions', // IGNORE
'help' => 'Write one search filter per line. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // IGNORE
+ 'view_filter' => 'Preview filters on existing articles (new window)', // IGNORE
),
'http_headers' => 'HTTP Headers', // IGNORE
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // IGNORE
diff --git a/app/i18n/en/sub.php b/app/i18n/en/sub.php
index ee3de4282..7560dc90c 100644
--- a/app/i18n/en/sub.php
+++ b/app/i18n/en/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filter actions',
'help' => 'Write one search filter per line. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)',
),
'http_headers' => 'HTTP Headers',
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/es/sub.php b/app/i18n/es/sub.php
index e5e09d0cc..8b15c4603 100644
--- a/app/i18n/es/sub.php
+++ b/app/i18n/es/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filtrar acciones',
'help' => 'Escribir un filtro de búsqueda por línea. Ver <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">documentación de operadores de búsqueda</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // IGNORE
'http_headers_help' => 'Los Headers son separados por un salto de linea, y el nombre y valor de un Header son separados con dos puntos (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/fa/sub.php b/app/i18n/fa/sub.php
index 239388557..908162473 100644
--- a/app/i18n/fa/sub.php
+++ b/app/i18n/fa/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => ' اعمال فیلتر',
'help' => ' در هر خط یک فیلتر جستجو بنویسید. اپراتورها <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">مستندات را ببینید</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP سربرگ‌ها',
'http_headers_help' => 'سر برگ ها با یک خط جدید از هم جدا می‌شوند و نام و مقدار سربرگ ها با یک دونقطه از هم جدا می‌شوند (مثلاً: <kbd><code>پذیرش: application/atom+xml<br />مجوز: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/fi/sub.php b/app/i18n/fi/sub.php
index d23943aa8..5d4062135 100644
--- a/app/i18n/fi/sub.php
+++ b/app/i18n/fi/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Suodatustoiminnot',
'help' => 'Kirjoita kukin hakusuodatin omalle rivilleen. Lisätietoja operaattoreista <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">ohjeissa</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP-otsikot',
'http_headers_help' => 'Otsikot erotellaan rivinvaihdoin, ja nimi ja arvo erotellaan kaksoispisteellä. Esimerkki: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/fr/sub.php b/app/i18n/fr/sub.php
index 9a0635b62..a52c8f1a1 100644
--- a/app/i18n/fr/sub.php
+++ b/app/i18n/fr/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filtres d’action',
'help' => 'Écrivez une recherche par ligne. Voir la <a href="https://freshrss.github.io/FreshRSS/fr/users/03_Main_view.html#gr%C3%A2ce-au-champ-de-recherche" target="_blank">documentation des opérateurs</a>.',
+ 'view_filter' => 'Aperçu des filtres sur les articles existants (nouvelle fenêtre)',
),
'http_headers' => 'Entêtes HTTP',
'http_headers_help' => 'Un entête HTTP par ligne, avec le nom et la valeur séparés par un deux-points (ex. : <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/he/sub.php b/app/i18n/he/sub.php
index ac45c07c8..5f756bde1 100644
--- a/app/i18n/he/sub.php
+++ b/app/i18n/he/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filter actions', // TODO
'help' => 'Write one search filter per line. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // TODO
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/hu/sub.php b/app/i18n/hu/sub.php
index 4c9c60b72..6c3b12e14 100644
--- a/app/i18n/hu/sub.php
+++ b/app/i18n/hu/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Szűrő műveletek',
'help' => 'Írj egy szűrőt soronként. Műveletek <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">a dokumentációban</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Fejlécek',
'http_headers_help' => 'A fejléceket újsor választja el, a fejléc nevét és értékét kettőspont választja el (pl: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/id/sub.php b/app/i18n/id/sub.php
index f8578fb61..881e1b01e 100644
--- a/app/i18n/id/sub.php
+++ b/app/i18n/id/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Tindakan penyaringan',
'help' => 'Tulis satu penyaringan pencarian per baris. Operator <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">lihat dokumentasi</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'Tajuk HTTP',
'http_headers_help' => 'Tajuk dipisahkan dengan baris baru dan nama dan nilai dari tajuk dipisahkan dengan titik dua (contoh: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/it/sub.php b/app/i18n/it/sub.php
index 5d381a3dc..48beb21db 100644
--- a/app/i18n/it/sub.php
+++ b/app/i18n/it/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Azioni di filtro',
'help' => 'Scrivi un filtro di ricerca per riga. Per li operatori <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">vedi la documentazione</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // IGNORE
'http_headers_help' => 'Le intestazioni sono separate da una linea e il nome e il valore di un’intestazione sono separati da due punti (p.es: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/ja/sub.php b/app/i18n/ja/sub.php
index d02117031..1d1e8c4ce 100644
--- a/app/i18n/ja/sub.php
+++ b/app/i18n/ja/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'フィルターアクション',
'help' => '1行に1つの検索フィルターを設定してください。演算子は<a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">ドキュメントを参照してください</a>。',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTPヘッダ',
'http_headers_help' => 'ヘッダは改行で区切られ、ヘッダの名前と値はコロンで区切られます (例: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/ko/sub.php b/app/i18n/ko/sub.php
index 8719e6f7b..9a9e15776 100644
--- a/app/i18n/ko/sub.php
+++ b/app/i18n/ko/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => '필터 동작',
'help' => '한 줄에 한 검색 필터를 작성해 주세요. 실행시 <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">문서 참고</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/lv/sub.php b/app/i18n/lv/sub.php
index 337d9418d..ddbcd9e8c 100644
--- a/app/i18n/lv/sub.php
+++ b/app/i18n/lv/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filtra darbības',
'help' => 'Uzrakstiet vienu meklēšanas filtru katrā rindā. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/nl/sub.php b/app/i18n/nl/sub.php
index 02aec863c..353c89fcb 100644
--- a/app/i18n/nl/sub.php
+++ b/app/i18n/nl/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filteracties',
'help' => 'Voer één zoekfilter per lijn in. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP-headers',
'http_headers_help' => 'Headers worden gescheiden door een regeleinde, en de naam en waarde van een header worden gescheiden door een dubbele punt (bijv.: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer een-token</code></kbd>).',
diff --git a/app/i18n/oc/sub.php b/app/i18n/oc/sub.php
index 678b32e1d..08510b9cb 100644
--- a/app/i18n/oc/sub.php
+++ b/app/i18n/oc/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filtre d’accion',
'help' => 'Escrivètz una recèrca per linha. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/pl/sub.php b/app/i18n/pl/sub.php
index a968b975b..55c24ab26 100644
--- a/app/i18n/pl/sub.php
+++ b/app/i18n/pl/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Akcje filtrowania',
'help' => 'Jedno zapytanie na linię. Operatory opisane są w <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">dokumentacji</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'Nagłówki HTTP',
'http_headers_help' => 'Nagłówki są oddzielane przez nową linię, a nazwa i wartość nagłówka są oddzielane przez dwukropek (np: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer jakiś-token</code></kbd>).',
diff --git a/app/i18n/pt-BR/sub.php b/app/i18n/pt-BR/sub.php
index 06703a6a2..0d43e6c93 100644
--- a/app/i18n/pt-BR/sub.php
+++ b/app/i18n/pt-BR/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Ações do filtro',
'help' => 'Escreva um filtro de pesquisa por linha. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/pt-PT/sub.php b/app/i18n/pt-PT/sub.php
index 72582fe25..0d2248cd1 100644
--- a/app/i18n/pt-PT/sub.php
+++ b/app/i18n/pt-PT/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Ações do filtro',
'help' => 'Escreva um filtro de pesquisa por linha. <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">Ver documentação</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/ru/sub.php b/app/i18n/ru/sub.php
index 174b80ce2..3abf60146 100644
--- a/app/i18n/ru/sub.php
+++ b/app/i18n/ru/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Действия фильтрации',
'help' => 'Введите по одному поисковому фильтру в строке. См. <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">документацию</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/sk/sub.php b/app/i18n/sk/sub.php
index a8026ee0f..42fa17ab4 100644
--- a/app/i18n/sk/sub.php
+++ b/app/i18n/sk/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filtrovať akcie',
'help' => 'Napíšte jeden výraz hľadania na riadok. Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/tr/sub.php b/app/i18n/tr/sub.php
index 62a0c43f4..bb2219e16 100644
--- a/app/i18n/tr/sub.php
+++ b/app/i18n/tr/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Filtre eylemleri',
'help' => 'Her satıra bir arama filtresi yazın. Operatörler için <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">belgelere bakın</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Başlıkları',
'http_headers_help' => 'Başlıklar yeni bir satırla ayrılır ve bir başlığın adı ile değeri iki nokta üst üste ile ayrılır (örneğin: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).',
diff --git a/app/i18n/uk/sub.php b/app/i18n/uk/sub.php
index 547593a92..8cc8b69ce 100644
--- a/app/i18n/uk/sub.php
+++ b/app/i18n/uk/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => 'Автоматичний фільтр',
'help' => 'По одному фільтру на рядок. Перегляньте <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">документацію операторів</a>.',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP-заголовки',
'http_headers_help' => 'По заголовку на рядок. Назву й значення відокремлено двокрапкою (наприклад, <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer деякий-токен</code></kbd>).',
diff --git a/app/i18n/zh-CN/sub.php b/app/i18n/zh-CN/sub.php
index 65b633107..0b0389c8e 100644
--- a/app/i18n/zh-CN/sub.php
+++ b/app/i18n/zh-CN/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => '过滤动作',
'help' => '每行写一条过滤规则,过滤规则可见 <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">文档</a>。',
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/i18n/zh-TW/sub.php b/app/i18n/zh-TW/sub.php
index 06ef379f2..3b6ff614b 100644
--- a/app/i18n/zh-TW/sub.php
+++ b/app/i18n/zh-TW/sub.php
@@ -80,6 +80,7 @@ return array(
'filteractions' => array(
'_' => '過濾動作',
'help' => '每行寫一條過濾搜尋 Operators <a href="https://freshrss.github.io/FreshRSS/en/users/10_filter.html#with-the-search-field" target="_blank">see documentation</a>.', // DIRTY
+ 'view_filter' => 'Preview filters on existing articles (new window)', // TODO
),
'http_headers' => 'HTTP Headers', // TODO
'http_headers_help' => 'Headers are separated by a newline, and the name and value of a header are separated by a colon (e.g: <kbd><code>Accept: application/atom+xml<br />Authorization: Bearer some-token</code></kbd>).', // TODO
diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml
index e9a21839c..3b92a9e4f 100644
--- a/app/views/configure/reading.phtml
+++ b/app/views/configure/reading.phtml
@@ -353,6 +353,11 @@
}
?></textarea>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ <p>
+ <button class="btn" formaction="<?= _url('configure', 'viewFilter', 'filters_name', 'filteractions_read') ?>" formtarget="_blank">
+ <?= _t('sub.feed.filteractions.view_filter') ?>
+ </button>
+ </p>
</div>
</div>
@@ -365,6 +370,11 @@
}
?></textarea>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ <p>
+ <button class="btn" formaction="<?= _url('configure', 'viewFilter', 'filters_name', 'filteractions_star') ?>" formtarget="_blank">
+ <?= _t('sub.feed.filteractions.view_filter') ?>
+ </button>
+ </p>
</div>
</div>
diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml
index 5e5fb4f10..231f86ebd 100644
--- a/app/views/helpers/category/update.phtml
+++ b/app/views/helpers/category/update.phtml
@@ -100,6 +100,11 @@
}
?></textarea>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ <p>
+ <button class="btn" formaction="<?= _url('category', 'viewFilter', 'id', $this->category->id()); ?>" formtarget="_blank">
+ <?= _t('sub.feed.filteractions.view_filter') ?>
+ </button>
+ </p>
</div>
</div>
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index c5dae8460..301cb1ced 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -308,6 +308,11 @@
}
?></textarea>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ <p>
+ <button class="btn" formaction="<?= _url('subscription', 'viewFilter', 'id', $this->feed->id()); ?>" formtarget="_blank">
+ <?= _t('sub.feed.filteractions.view_filter') ?>
+ </button>
+ </p>
</div>
</div>