projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring ongoing on week view functions.
[timetracker.git]
/
mobile
/
time_delete.php
diff --git
a/mobile/time_delete.php
b/mobile/time_delete.php
index
9e818e7
..
c9602b4
100644
(file)
--- a/
mobile/time_delete.php
+++ b/
mobile/time_delete.php
@@
-38,12
+38,6
@@
if (!ttAccessCheck(right_data_entry)) {
exit();
}
exit();
}
-// Use Custom Fields plugin if we have one.
-// if (file_exists("plugins/CustomFields.class.php")) {
-// require_once("plugins/CustomFields.class.php");
-// $custom_fields = new CustomFields($user->team_id);
-// }
-
$cl_id = $request->getParameter('id');
$time_rec = ttTimeHelper::getRecord($cl_id, $user->getActiveUser());
$cl_id = $request->getParameter('id');
$time_rec = ttTimeHelper::getRecord($cl_id, $user->getActiveUser());
@@
-59,19
+53,11
@@
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()) {