A free, self-hostable news aggregator…
keep_max disabled by default for existing installations (#2607)
Alexandre Alapetitee4511c3d342c
diff --git a/app/Models/Context.php b/app/Models/Context.phpindex 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