aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/indexController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-03-01 20:42:18 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-03-01 20:42:18 +0100
commit6939b7989b4ee96d3126f8665faaef70ebe10cbc (patch)
tree992ac33776e21e8a991bb3018681cfc2a0f381d0 /app/Controllers/indexController.php
parent71f7ce1be5833b54b0f4e1f37e6557425c364725 (diff)
parentc56cd80917e2efd9149cb99cf900b59d184ea7a8 (diff)
Merge pull request #434 from aledeg/issue428
Show only unread when selecting unread
Diffstat (limited to 'app/Controllers/indexController.php')
-rwxr-xr-xapp/Controllers/indexController.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php
index 38f4c0e7c..c760e0f01 100755
--- a/app/Controllers/indexController.php
+++ b/app/Controllers/indexController.php
@@ -84,6 +84,7 @@ class FreshRSS_index_Controller extends Minz_ActionController {
// On récupère les différents éléments de filtrage
$this->view->state = $state = Minz_Request::param ('state', $this->view->conf->default_view);
+ $state_param = Minz_Request::param ('state', null);
$filter = Minz_Request::param ('search', '');
if (!empty($filter)) {
$state = 'all'; //Search always in read and unread articles
@@ -111,7 +112,7 @@ class FreshRSS_index_Controller extends Minz_ActionController {
$hasUnread = true;
break;
}
- if (!$hasUnread) {
+ if (!$hasUnread && is_null($state_param)) {
$this->view->state = $state = 'all';
}
}
@@ -129,7 +130,7 @@ class FreshRSS_index_Controller extends Minz_ActionController {
// 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)) {
+ if ($state === 'not_read' && empty($entries) && is_null($state_param)) {
Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG);
$this->view->state = 'all';
$entries = $entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min, $keepHistoryDefault);