projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed user edit.
[timetracker.git]
/
week.php
diff --git
a/week.php
b/week.php
index
44a05bd
..
1945324
100644
(file)
--- a/
week.php
+++ b/
week.php
@@
-368,11
+368,12
@@
if ($request->isPost()) {
$existingDuration = $dataArray[$rowNumber][$dayHeader]['duration'];
// If posted value is not null, check and normalize it.
if ($postedDuration) {
$existingDuration = $dataArray[$rowNumber][$dayHeader]['duration'];
// If posted value is not null, check and normalize it.
if ($postedDuration) {
- if (ttTimeHelper::isValidDuration($postedDuration)) {
- $postedDuration = ttTimeHelper::normalizeDuration($postedDuration, false); // No leading zero.
- } else {
+ if (false === ttTimeHelper::postedDurationToMinutes($postedDuration)) {
$err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration'));
$result = false; break; // Break out. Stop any further processing.
$err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration'));
$result = false; break; // Break out. Stop any further processing.
+ } else {
+ $minutes = ttTimeHelper::postedDurationToMinutes($postedDuration);
+ $postedDuration = ttTimeHelper::minutesToDuration($minutes);
}
}
// Do not process if value has not changed.
}
}
// Do not process if value has not changed.