projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Testing branches and merges.
[timetracker.git]
/
mobile
/
time.php
diff --git
a/mobile/time.php
b/mobile/time.php
index
b7a26b6
..
679dcad
100644
(file)
--- a/
mobile/time.php
+++ b/
mobile/time.php
@@
-54,7
+54,7
@@
$prev_date = date('Y-m-d', strtotime('-1 day', strtotime($cl_date)));
$next_date = date('Y-m-d', strtotime('+1 day', strtotime($cl_date)));
// Use custom fields plugin if it is enabled.
$next_date = date('Y-m-d', strtotime('+1 day', strtotime($cl_date)));
// Use custom fields plugin if it is enabled.
-if (
in_array('cf', explode(',', $user->plugins)
)) {
+if (
$user->isPluginEnabled('cf'
)) {
require_once('../plugins/CustomFields.class.php');
$custom_fields = new CustomFields($user->team_id);
$smarty->assign('custom_fields', $custom_fields);
require_once('../plugins/CustomFields.class.php');
$custom_fields = new CustomFields($user->team_id);
$smarty->assign('custom_fields', $custom_fields);
@@
-183,14
+183,6
@@
if ($custom_fields && $custom_fields->fields[0]) {
}
}
}
}
-// Determine lock date. Time entries earlier than lock date cannot be created or modified.
-$lock_interval = $user->lock_interval;
-$lockdate = 0;
-if ($lock_interval > 0) {
- $lockdate = new DateAndTime();
- $lockdate->decDay($lock_interval);
-}
-
// Submit.
if ($request->isPost()) {
if ($request->getParameter('btn_submit')) {
// Submit.
if ($request->isPost()) {
if ($request->getParameter('btn_submit')) {
@@
-241,9
+233,9
@@
if ($request->isPost()) {
$err->add($i18n->getKey('error.future_date'));
}
$err->add($i18n->getKey('error.future_date'));
}
- // Prohibit creating
time entries in locked interval
.
- if
($lockdate && $selected_date->before($lock
date))
- $err->add($i18n->getKey('error.
period
_locked'));
+ // Prohibit creating
entries in locked range
.
+ if
($user->isDateLocked($selected_
date))
+ $err->add($i18n->getKey('error.
range
_locked'));
// Prohibit creating another uncompleted record.
if ($err->no()) {
// Prohibit creating another uncompleted record.
if ($err->no()) {