diff options
| author | 2012-12-04 22:41:45 +0100 | |
|---|---|---|
| committer | 2012-12-04 22:41:45 +0100 | |
| commit | 75f8898dcdfca963b731dffe7c1766d60fd410ea (patch) | |
| tree | 86cc7ef48c22ad48dbc9f03c409c05da3360c98f /app/controllers/indexController.php | |
| parent | 0a0758995a10e28863f827be41c7a59340bc5e59 (diff) | |
Fix issue #21 - bug affichage lorsque non lus par défaut
Diffstat (limited to 'app/controllers/indexController.php')
| -rwxr-xr-x | app/controllers/indexController.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/controllers/indexController.php b/app/controllers/indexController.php index 7d878108d..4002a0032 100755 --- a/app/controllers/indexController.php +++ b/app/controllers/indexController.php @@ -10,7 +10,16 @@ class indexController extends ActionController { $entryDAO = new EntryDAO (); $catDAO = new CategoryDAO (); - $mode = Session::param ('mode', $this->view->conf->defaultView ()); + $default_view = $this->view->conf->defaultView (); + $mode = Session::param ('mode'); + if ($mode == false) { + if ($default_view == 'not_read' && $this->view->nb_not_read < 1) { + $mode = 'all'; + } else { + $mode = $default_view; + } + } + $get = Request::param ('get'); $order = $this->view->conf->sortOrder (); @@ -34,6 +43,7 @@ class indexController extends ActionController { View::prependTitle ('Vos flux RSS - '); } $this->view->get = $get; + $this->view->mode = $mode; // Cas où on ne choisie ni catégorie ni les favoris // ou si la catégorie ne correspond à aucune |
