aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/indexController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-09-30 22:28:47 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-09-30 22:28:47 +0200
commita5a0bd9a350836cb7e504fdb501c82cda37d2562 (patch)
tree5733bec827f9485c7652efaf9e979694c5eeaba9 /app/Controllers/indexController.php
parent5e8872983a84f68bb1b6de560fc44bdaa1cd90d7 (diff)
SQL performance: Removed filter to hide old articles
As discussed on https://github.com/marienfressinaud/FreshRSS/issues/493#issuecomment-56266415 For performance, but this is also a good simplification. Will help with PostgreSQL https://github.com/marienfressinaud/FreshRSS/issues/416 and SQLite too https://github.com/marienfressinaud/FreshRSS/issues/100 because the main query becomes simpler. Me may need to introduce another system to hide old articles, if this is a problem for some users. Also, the feature showing "empty feeds" in another colour may need to be adapted.
Diffstat (limited to 'app/Controllers/indexController.php')
-rwxr-xr-xapp/Controllers/indexController.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php
index e8e26b142..1b6563bb3 100755
--- a/app/Controllers/indexController.php
+++ b/app/Controllers/indexController.php
@@ -113,16 +113,10 @@ class FreshRSS_index_Controller extends Minz_ActionController {
}
}
- $today = @strtotime('today');
- $this->view->today = $today;
-
- // on calcule la date des articles les plus anciens qu'on affiche
- $nb_month_old = $this->view->conf->old_entries;
- $date_min = $today - (3600 * 24 * 30 * $nb_month_old); //Do not use a fast changing value such as time() to allow SQL caching
- $keepHistoryDefault = $this->view->conf->keep_history_default;
+ $this->view->today = @strtotime('today');
try {
- $entries = $entryDAO->listWhere($getType, $getId, $this->view->state, $order, $nb + 1, $first, $filter, $date_min, true, $keepHistoryDefault);
+ $entries = $entryDAO->listWhere($getType, $getId, $this->view->state, $order, $nb + 1, $first, $filter);
// Si on a récupéré aucun article "non lus"
// on essaye de récupérer tous les articles
@@ -135,7 +129,7 @@ class FreshRSS_index_Controller extends Minz_ActionController {
Minz_Log::record('Failed to automatically correct nbNotRead! ' + $ex->getMessage(), Minz_Log::NOTICE);
}
$this->view->state = FreshRSS_Entry::STATE_ALL;
- $entries = $entryDAO->listWhere($getType, $getId, $this->view->state, $order, $nb, $first, $filter, $date_min, true, $keepHistoryDefault);
+ $entries = $entryDAO->listWhere($getType, $getId, $this->view->state, $order, $nb, $first, $filter);
}
Minz_Request::_param('state', $this->view->state);