aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/subscriptionController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-12-03 19:52:02 +0100
committerGravatar GitHub <noreply@github.com> 2023-12-03 19:52:02 +0100
commitf0d4f2762d2b74eeadf2fb64ff83039b5cc16c26 (patch)
treeebdb0bcffeb4370d1fa08defe7313dbf5f02e47a /app/Controllers/subscriptionController.php
parenteb2c2d9a01ba54865b944f75d8436f933ed3ebfc (diff)
Rework keepmax (#5905)
* Rework keepmax fix https://github.com/FreshRSS/FreshRSS/issues/5702 fix https://github.com/FreshRSS/FreshRSS/issues/5870 * More WIP * Minor progress * Progress * Beta * Improved debug message * Revert noCommit * Fix variable reset * Remove debug syslogs
Diffstat (limited to 'app/Controllers/subscriptionController.php')
-rw-r--r--app/Controllers/subscriptionController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php
index 5566224ef..65e36d819 100644
--- a/app/Controllers/subscriptionController.php
+++ b/app/Controllers/subscriptionController.php
@@ -124,8 +124,8 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
$feed->_attributes('read_upon_reception', Minz_Request::paramTernary('read_upon_reception'));
$feed->_attributes('clear_cache', Minz_Request::paramTernary('clear_cache'));
- $keep_max_n_unread = Minz_Request::paramInt('keep_max_n_unread');
- $feed->_attributes('keep_max_n_unread', $keep_max_n_unread > 0 ? $keep_max_n_unread : null);
+ $keep_max_n_unread = Minz_Request::paramTernary('keep_max_n_unread') === true ? Minz_Request::paramInt('keep_max_n_unread') : null;
+ $feed->_attributes('keep_max_n_unread', $keep_max_n_unread >= 0 ? $keep_max_n_unread : null);
$read_when_same_title_in_feed = Minz_Request::paramString('read_when_same_title_in_feed');
if ($read_when_same_title_in_feed === '') {