aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/indexController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/indexController.php')
-rwxr-xr-xapp/controllers/indexController.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/indexController.php b/app/controllers/indexController.php
index 16a053ba3..92070590a 100755
--- a/app/controllers/indexController.php
+++ b/app/controllers/indexController.php
@@ -124,15 +124,19 @@ class FreshRSS_index_Controller extends Minz_ActionController {
}
}
+ // on calcule la date des articles les plus anciens qu'on affiche
+ $nb_month_old = $this->view->conf->oldEntries ();
+ $date_min = time () - (3600 * 24 * 30 * $nb_month_old);
+
try {
- $entries = $this->entryDAO->listWhere($getType, $getId, $state, $order, $nb + 1, $first, $filter);
+ $entries = $this->entryDAO->listWhere($getType, $getId, $state, $order, $nb + 1, $first, $filter, $date_min);
// Si on a récupéré aucun article "non lus"
// on essaye de récupérer tous les articles
if ($state === 'not_read' && empty($entries)) { //TODO: Remove in v0.8
Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG);
$this->view->state = 'all';
- $entries = $this->entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter);
+ $entries = $this->entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min);
}
if (count($entries) <= $nb) {