aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Context.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Context.php')
-rw-r--r--app/Models/Context.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/Models/Context.php b/app/Models/Context.php
index bfc4299c9..e27330665 100644
--- a/app/Models/Context.php
+++ b/app/Models/Context.php
@@ -54,14 +54,13 @@ class FreshRSS_Context {
//Legacy
$oldEntries = (int)FreshRSS_Context::$user_conf->param('old_entries', 0);
- if ($oldEntries > 0) { //Freshrss < 1.15
- $archiving['keep_period'] = 'P' . $oldEntries . 'M';
- }
-
$keepMin = (int)FreshRSS_Context::$user_conf->param('keep_history_default', -5);
- if ($keepMin > -5) { //Freshrss < 1.15
+ if ($oldEntries > 0 || $keepMin > -5) { //Freshrss < 1.15
$archiving = FreshRSS_Context::$user_conf->archiving;
$archiving['keep_max'] = false;
+ if ($oldEntries > 0) {
+ $archiving['keep_period'] = 'P' . $oldEntries . 'M';
+ }
if ($keepMin > 0) {
$archiving['keep_min'] = $keepMin;
} elseif ($keepMin == -1) { //Infinite