From 9c4ab146c232549bc5276189be3eb2daf82a3169 Mon Sep 17 00:00:00 2001 From: anuko Date: Fri, 29 Dec 2017 23:14:56 +0000 Subject: [PATCH] Fixed a problem with inserting values with 0 duration from week view. --- WEB-INF/templates/footer.tpl | 2 +- week.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 7b92e163..44ffd6c7 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.2.3709| Copyright © Anuko | +  Anuko Time Tracker 1.13.2.3710| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index 68193f56..d457837b 100644 --- a/week.php +++ b/week.php @@ -338,7 +338,10 @@ if ($request->isPost()) { continue; // Posted value is different. if ($existingDuration == null) { - // Insert a new record here. + // Skip inserting 0 duration values. + if (0 == ttTimeHelper::toMinutes($postedDuration)) + continue; + // Insert a new record. $fields = array(); $fields['row_id'] = $dataArray[$rowNumber]['row_id']; if (!$fields['row_id']) { -- 2.20.1