From e98ac32716dfe9343baa5bce7ad2c1e98c40540c Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Wed, 22 Jan 2014 19:06:46 -0500 Subject: Ajout de statistiques de l'application Conflicts: app/i18n/en.php app/i18n/fr.php --- app/Controllers/indexController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/Controllers/indexController.php') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 45ded6fd4..84ed992f9 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -6,12 +6,14 @@ class FreshRSS_index_Controller extends Minz_ActionController { private $entryDAO; private $feedDAO; private $catDAO; + private $statsDAO; function __construct($router) { parent::__construct($router); $this->entryDAO = new FreshRSS_EntryDAO (); $this->feedDAO = new FreshRSS_FeedDAO (); $this->catDAO = new FreshRSS_CategoryDAO (); + $this->statsDAO = new FreshRSS_StatsDAO (); } public function indexAction () { @@ -198,6 +200,14 @@ class FreshRSS_index_Controller extends Minz_ActionController { return false; } } + + public function statsAction () { + Minz_View::appendScript (Minz_Url::display ('/scripts/flotr2.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/flotr2.min.js'))); + $this->view->repartition = $this->statsDAO->calculateEntryRepartition(); + $this->view->count = ($this->statsDAO->calculateEntryCount()); + $this->view->feedByCategory = $this->statsDAO->calculateFeedByCategory(); + $this->view->entryByCategory = $this->statsDAO->calculateEntryByCategory(); + } public function aboutAction () { Minz_View::prependTitle (Minz_Translate::t ('about') . ' ยท '); -- cgit v1.2.3