From a2c9be17652110a021c2a6ab867ad78ecd1bcc2d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Mon, 29 Oct 2018 13:14:09 +0000 Subject: [PATCH] A bit of refactoring. --- WEB-INF/lib/ttReportHelper.class.php | 15 ++------------- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/WEB-INF/lib/ttReportHelper.class.php b/WEB-INF/lib/ttReportHelper.class.php index 280b70db..0b8dc83c 100644 --- a/WEB-INF/lib/ttReportHelper.class.php +++ b/WEB-INF/lib/ttReportHelper.class.php @@ -352,19 +352,11 @@ class ttReportHelper { if ('no_grouping' != $group_by_option) { $val['grouped_by'] = $val[$group_by_option]; if ('date' == $group_by_option) { - // This is needed to get the date in user date format. - //$o_date = new DateAndTime(DB_DATEFORMAT, $val['grouped_by']); - //$val['grouped_by'] = $o_date->toString($user->date_format); - //unset($o_date); - $val['grouped_by'] = ttDateToUserFormat($val['grouped_by']); } } - // This is needed to get the date in user date format. - $o_date = new DateAndTime(DB_DATEFORMAT, $val['date']); - $val['date'] = $o_date->toString($user->date_format); - unset($o_date); + $val['date'] = ttDateToUserFormat($val['date']); $row = $val; $report_items[] = $row; @@ -538,10 +530,7 @@ class ttReportHelper { while ($val = $res->fetchRow()) { if ('date' == $group_by_option) { - // This is needed to get the date in user date format. - $o_date = new DateAndTime(DB_DATEFORMAT, $val['group_field']); - $val['group_field'] = $o_date->toString($user->date_format); - unset($o_date); + $val['group_field'] = ttDateToUserFormat($val['group_field']); } $time = $val['time'] ? sec_to_time_fmt_hm($val['time']) : null; if ($options['show_cost']) { diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 54df5f94..5fe88277 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.01.4329 | Copyright © Anuko | +  Anuko Time Tracker 1.18.01.4330 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1