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 diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml index 2e6d75ae8..86352f6ad 100644 --- a/app/views/index/index.phtml +++ b/app/views/index/index.phtml @@ -3,7 +3,7 @@
conf) || is_logged ()) { ?> Tout marquer comme luTout afficher -->Afficher les non lus diff --git a/public/data/Configuration.array.php b/public/data/Configuration.array.php index 93e089c9e..d00f08233 100644 --- a/public/data/Configuration.array.php +++ b/public/data/Configuration.array.php @@ -1,7 +1,7 @@ 50, - 'default_view' => 'all', + 'posts_per_page' => 20, + 'default_view' => 'not_read', 'display_posts' => 'no', 'sort_order' => 'low_to_high', 'old_entries' => 3,