diff options
Diffstat (limited to 'app/controllers/feedController.php')
| -rwxr-xr-x | app/controllers/feedController.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php index e54a2ac12..5c905e6da 100755 --- a/app/controllers/feedController.php +++ b/app/controllers/feedController.php @@ -159,10 +159,11 @@ class feedController extends ActionController { $nb_month_old = $this->view->conf->oldEntries (); $date_min = time () - (60 * 60 * 24 * 30 * $nb_month_old); if (rand(0, 30) === 1) { - Minz_Log::record ('CleanOldEntries', Minz_Log::DEBUG); - if ($entryDAO->cleanOldEntries ($date_min) > 0) { - Minz_Log::record ('UpdateCachedValues', Minz_Log::DEBUG); - $feedDAO->updateCachedValues (); + $nb= $entryDAO->cleanOldEntries ($date_min); + Minz_Log::record ($nb . ' old entries cleaned.', Minz_Log::DEBUG); + if ($nbOld > 0) { + $nb = $feedDAO->updateCachedValues (); + Minz_Log::record ($nb . ' cached values updated.', Minz_Log::DEBUG); } } |
