From 64824c4076139274dda8f643bc4e0d4923af75a6 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Tue, 12 May 2015 14:21:03 -0500 Subject: [PATCH] dashboard: Fix crash getting data for plots --- include/ajax.reports.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/ajax.reports.php b/include/ajax.reports.php index 6dbf60df5..6086e3cb0 100644 --- a/include/ajax.reports.php +++ b/include/ajax.reports.php @@ -19,6 +19,7 @@ if(!defined('INCLUDE_DIR')) die('403'); include_once(INCLUDE_DIR.'class.ticket.php'); +include_once(INCLUDE_DIR.'class.report.php'); /** * Overview Report @@ -174,11 +175,7 @@ class OverviewReportAjaxAPI extends AjaxController { $stop = $this->get('period', 'now'); } - if ($start != 'last month') - $start = DateTime::createFromFormat($cfg->getDateFormat(), - $start)->format('U'); - else - $start = strtotime($start); + $start = strtotime($start); if (substr($stop, 0, 1) == '+') $stop = strftime('%Y-%m-%d ', $start) . $stop; -- GitLab