From e20813a282b957d4b9112b825f87502c3525a780 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 6 Apr 2016 17:04:08 +0000 Subject: [PATCH] Fix report exports to honor user decimal mark designation. --- WEB-INF/config.php.dist | 2 +- WEB-INF/lib/common.lib.php | 3 ++- WEB-INF/templates/footer.tpl | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WEB-INF/config.php.dist b/WEB-INF/config.php.dist index bca0da0e..b52e0d80 100644 --- a/WEB-INF/config.php.dist +++ b/WEB-INF/config.php.dist @@ -174,7 +174,7 @@ define('LANG_DEFAULT', ''); define('CURRENCY_DEFAULT', '$'); -// EXPORT_DECIMAL_DURATION - defines whether time duration values are decimal in CSV and XML data exports (1.25 vs 1:15). +// EXPORT_DECIMAL_DURATION - defines whether time duration values are decimal in CSV and XML data exports (1.25 or 1,25 vs 1:15). // define('EXPORT_DECIMAL_DURATION', true); diff --git a/WEB-INF/lib/common.lib.php b/WEB-INF/lib/common.lib.php index 124b78f5..d98e8889 100644 --- a/WEB-INF/lib/common.lib.php +++ b/WEB-INF/lib/common.lib.php @@ -144,13 +144,14 @@ } function time_to_decimal($a) { + global $user; $tmp = explode(":", $a); if($tmp[1]{0}=="0") $tmp[1] = $tmp[1]{1}; $m = round($tmp[1]*100/60); if($m<10) $m = "0".$m; - $time = $tmp[0].".".$m; + $time = $tmp[0].$user->decimal_mark.$m; return $time; } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 40a17ec2..f15d95d6 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.24.3495 | Copyright © Anuko | +  Anuko Time Tracker 1.9.25.3496 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1