aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/configureController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-12-10 12:41:24 +0100
committerGravatar GitHub <noreply@github.com> 2023-12-10 12:41:24 +0100
commitb46ea88c3580bea1b303e02602b9ec94d5303776 (patch)
tree3407a94e0a35644f609a3cb909f2c69095d6299b /app/Controllers/configureController.php
parent803fa8fdb50c8b98efed2b89a7adf3eb6df189d9 (diff)
Fix archiving (#5935)
fix https://github.com/FreshRSS/FreshRSS/issues/5934 Regression from https://github.com/FreshRSS/FreshRSS/pull/5830
Diffstat (limited to 'app/Controllers/configureController.php')
-rw-r--r--app/Controllers/configureController.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index ffba5186f..5a5128346 100644
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -258,13 +258,15 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {
'keep_period_count' => '3',
'keep_period_unit' => 'P1M',
];
- $keepPeriod = FreshRSS_Context::$user_conf->archiving['keep_period'];
- if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $keepPeriod, $matches)) {
- $volatile = [
- 'enable_keep_period' => true,
- 'keep_period_count' => $matches['count'],
- 'keep_period_unit' => str_replace($matches['count'], '1', $keepPeriod),
- ];
+ if (!empty(FreshRSS_Context::$user_conf->archiving['keep_period'])) {
+ $keepPeriod = FreshRSS_Context::$user_conf->archiving['keep_period'];
+ if (preg_match('/^PT?(?P<count>\d+)[YMWDH]$/', $keepPeriod, $matches)) {
+ $volatile = [
+ 'enable_keep_period' => true,
+ 'keep_period_count' => $matches['count'],
+ 'keep_period_unit' => str_replace($matches['count'], '1', $keepPeriod),
+ ];
+ }
}
FreshRSS_Context::$user_conf->volatile = $volatile;