From a6f122e03cebd9b2ceed029344ddd2e72af460e3 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 28 Jan 2014 00:18:30 +0100 Subject: Formatage des nombres #2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/marienfressinaud/FreshRSS/pull/398 Je suis reparti du commit 7a510af73a0ef04ce09fb7eedd98c844e7bff51c, ai ajouté la gestion des espaces à une fonction de conversion des entiers, corrigé ce qui devait être fait côté PHP, et remis manuellement les patchs intermédiaires (j'espère ne pas avoir oublié de corrections). Le code est même plus simple qu'avant. Testé aussi sur titre et favoris --- app/Controllers/indexController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Controllers') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 7d6d73c28..986a322a1 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -44,6 +44,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { $this->view->cat_aside = $catDAO->listCategories (); $this->view->nb_favorites = $entryDAO->countUnreadReadFavorites (); + $this->view->nb_not_read = FreshRSS_CategoryDAO::CountUnreads($this->view->cat_aside, 1); $this->view->currentName = ''; $this->view->get_c = ''; @@ -61,8 +62,6 @@ class FreshRSS_index_Controller extends Minz_ActionController { return; } - $this->view->nb_not_read = FreshRSS_CategoryDAO::CountUnreads($this->view->cat_aside, 1); - // mise à jour des titres $this->view->rss_title = $this->view->currentName . ' | ' . Minz_View::title(); if ($this->view->nb_not_read > 0) { @@ -153,10 +152,12 @@ class FreshRSS_index_Controller extends Minz_ActionController { switch ($getType) { case 'a': $this->view->currentName = Minz_Translate::t ('your_rss_feeds'); + $this->nb_not_read_cat = $this->view->nb_not_read; $this->view->get_c = $getType; return true; case 's': $this->view->currentName = Minz_Translate::t ('your_favorites'); + $this->nb_not_read_cat = $this->view->nb_favorites['unread']; $this->view->get_c = $getType; return true; case 'c': -- cgit v1.2.3