summaryrefslogtreecommitdiff
path: root/app/Controllers/indexController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-01 23:29:53 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-01 23:30:01 +0200
commit300c508d9e4732a7c6e8025ee62f934f7ecc5328 (patch)
tree2017cb8d1b89a220a56ac9110ecfa2d3911dd7c7 /app/Controllers/indexController.php
parent63c9c47a761b9925e6811ae630c3b77ef05b9fc8 (diff)
Automatically correct cache number of unread articles
Diffstat (limited to 'app/Controllers/indexController.php')
-rwxr-xr-xapp/Controllers/indexController.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php
index 4fcc3176f..0f244f9b6 100755
--- a/app/Controllers/indexController.php
+++ b/app/Controllers/indexController.php
@@ -126,6 +126,12 @@ class FreshRSS_index_Controller extends Minz_ActionController {
// on essaye de récupérer tous les articles
if ($state === FreshRSS_Entry::STATE_NOT_READ && empty($entries) && ($state_param === null)) {
Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG);
+ $feedDAO = new FreshRSS_FeedDAO();
+ try {
+ $feedDAO->updateCachedValues();
+ } catch (Exception $ex) {
+ Minz_Log::record ('Failed to automatically correct nbNotRead! ' + $ex->getMessage(), Minz_Log::DEBUG);
+ }
$this->view->state = FreshRSS_Entry::STATE_ALL;
$entries = $entryDAO->listWhere($getType, $getId, $this->view->state, $order, $nb, $first, $filter, $date_min, true, $keepHistoryDefault);
}