diff options
| author | 2013-12-25 17:37:52 +0100 | |
|---|---|---|
| committer | 2013-12-25 17:37:52 +0100 | |
| commit | 06d4b8d10247146d9c6f7c78ff9fc584438dd8fe (patch) | |
| tree | c85a0f839df94ef77a168ce0865586e9f03372af /app/Controllers/feedController.php | |
| parent | a4b890b67fb4d97c97a2b1b455c327ce4b905194 (diff) | |
Option globale pour la taille minimale de l'historique par défaut
Plus une réorganisation des options
Diffstat (limited to 'app/Controllers/feedController.php')
| -rwxr-xr-x | app/Controllers/feedController.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index e7d9c97c3..836044da6 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -223,8 +223,13 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } } - if (($feed->keepHistory() >= 0) && (rand(0, 30) === 1)) { - $nb = $feedDAO->cleanOldEntries ($feed->id (), $date_min, max($feed->keepHistory(), count($entries) + 10)); + $feedHistory = $feed->keepHistory(); + if ($feedHistory == -2) { //default + $feedHistory = $this->view->conf->keepHistoryDefault(); + } + + if (($feedHistory >= 0) && (rand(0, 30) === 1)) { + $nb = $feedDAO->cleanOldEntries ($feed->id (), $date_min, max($feedHistory, count($entries) + 10)); if ($nb > 0) { Minz_Log::record ($nb . ' old entries cleaned in feed ' . $feed->id (), Minz_Log::DEBUG); } |
