From 0cb717f4407b81868d6b909d1d4ef4795c5e4b50 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 31 Aug 2016 21:21:09 -0400 Subject: Replace all date fields by helper --- app/Controller/AnalyticController.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'app/Controller/AnalyticController.php') diff --git a/app/Controller/AnalyticController.php b/app/Controller/AnalyticController.php index ab0646a2..c3e7409a 100644 --- a/app/Controller/AnalyticController.php +++ b/app/Controller/AnalyticController.php @@ -31,8 +31,6 @@ class AnalyticController extends BaseController 'project' => $project, 'average' => $this->averageLeadCycleTimeAnalytic->build($project['id']), 'metrics' => $this->projectDailyStatsModel->getRawMetrics($project['id'], $from, $to), - 'date_format' => $this->configModel->get('application_date_format'), - 'date_formats' => $this->dateParser->getAvailableFormats($this->dateParser->getDateFormats()), 'title' => t('Lead and cycle time'), ))); } @@ -155,8 +153,6 @@ class AnalyticController extends BaseController 'display_graph' => $display_graph, 'metrics' => $display_graph ? $this->projectDailyColumnStatsModel->getAggregatedMetrics($project['id'], $from, $to, $column) : array(), 'project' => $project, - 'date_format' => $this->configModel->get('application_date_format'), - 'date_formats' => $this->dateParser->getAvailableFormats($this->dateParser->getDateFormats()), 'title' => $title, ))); } @@ -169,8 +165,8 @@ class AnalyticController extends BaseController $to = $this->request->getStringParam('to', date('Y-m-d')); if (! empty($values)) { - $from = $values['from']; - $to = $values['to']; + $from = $this->dateParser->getIsoDate($values['from']); + $to = $this->dateParser->getIsoDate($values['to']); } return array($from, $to); -- cgit v1.2.3