From a7aca6c0abfd905669004c1e4f7c8328060df27e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 19 Sep 2021 10:56:38 +0200 Subject: Improved feed action filters (#3303) * Re-order some feed options * Option to auto mark as read existing titles * Option to keep at max n unread articles per feed --- app/Controllers/configureController.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'app/Controllers/configureController.php') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 388c34624..79ddf8e17 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -121,9 +121,12 @@ class FreshRSS_configure_Controller extends Minz_ActionController { FreshRSS_Context::$user_conf->sort_order = Minz_Request::param('sort_order', 'DESC'); FreshRSS_Context::$user_conf->mark_when = array( 'article' => Minz_Request::param('mark_open_article', false), - 'site' => Minz_Request::param('mark_open_site', false), - 'scroll' => Minz_Request::param('mark_scroll', false), + 'max_n_unread' => Minz_Request::paramBoolean('enable_keep_max_n_unread') ? Minz_Request::param('keep_max_n_unread', false) : false, 'reception' => Minz_Request::param('mark_upon_reception', false), + 'same_title_in_feed' => Minz_Request::paramBoolean('enable_read_when_same_title_in_feed') ? + Minz_Request::param('read_when_same_title_in_feed', false) : false, + 'scroll' => Minz_Request::param('mark_scroll', false), + 'site' => Minz_Request::param('mark_open_site', false), ); FreshRSS_Context::$user_conf->save(); invalidateHttpCache(); @@ -210,7 +213,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { } elseif (!$keepMax = Minz_Request::param('keep_max')) { $keepMax = FreshRSS_Feed::ARCHIVING_RETENTION_COUNT_LIMIT; } - if ($enableRetentionPeriod = Minz_Request::paramBoolean('enable_keep_period')) { + if (Minz_Request::paramBoolean('enable_keep_period')) { $keepPeriod = FreshRSS_Feed::ARCHIVING_RETENTION_PERIOD; if (is_numeric(Minz_Request::param('keep_period_count')) && preg_match('/^PT?1[YMWDH]$/', Minz_Request::param('keep_period_unit'))) { $keepPeriod = str_replace('1', Minz_Request::param('keep_period_count'), Minz_Request::param('keep_period_unit')); -- cgit v1.2.3