projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More work on labels.
[timetracker.git]
/
time_delete.php
diff --git
a/time_delete.php
b/time_delete.php
index
273cba3
..
c501728
100644
(file)
--- a/
time_delete.php
+++ b/
time_delete.php
@@
-52,19
+52,12
@@
if ($request->isPost()) {
// Determine if it's okay to delete the record.
$item_date = new DateAndTime(DB_DATEFORMAT, $time_rec['date']);
// Determine if it's okay to delete the record.
$item_date = new DateAndTime(DB_DATEFORMAT, $time_rec['date']);
- // Determine lock date.
- $lock_interval = $user->lock_interval;
- $lockdate = 0;
- if ($lock_interval > 0) {
- $lockdate = new DateAndTime();
- $lockdate->decDay($lock_interval);
- }
+
// Determine if the record is uncompleted.
$uncompleted = ($time_rec['duration'] == '0:00');
// Determine if the record is uncompleted.
$uncompleted = ($time_rec['duration'] == '0:00');
- if($lockdate && $item_date->before($lockdate) && !$uncompleted) {
- $err->add($i18n->getKey('error.period_locked'));
- }
+ if ($user->isDateLocked($item_date) && !$uncompleted)
+ $err->add($i18n->getKey('error.range_locked'));
if ($err->no()) {
if ($err->no()) {