A bit of refactoring.
authorNik Okuntseff <support@anuko.com>
Mon, 29 Oct 2018 13:14:09 +0000 (13:14 +0000)
committerNik Okuntseff <support@anuko.com>
Mon, 29 Oct 2018 13:14:09 +0000 (13:14 +0000)
WEB-INF/lib/ttReportHelper.class.php
WEB-INF/templates/footer.tpl

index 280b70d..0b8dc83 100644 (file)
@@ -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']) {
index 54df5f9..5fe8827 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.01.4329 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.01.4330 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>