// Validate user input.
if (in_array('cl', explode(',', $user->plugins)) && in_array('cm', explode(',', $user->plugins)) && !$cl_client)
// Validate user input.
if (in_array('cl', explode(',', $user->plugins)) && in_array('cm', explode(',', $user->plugins)) && !$cl_client)
- if (!ttValidString($cl_cf_1, !$custom_fields->fields[0]['required'])) $errors->add($i18n->getKey('error.field'), $custom_fields->fields[0]['label']);
+ if (!ttValidString($cl_cf_1, !$custom_fields->fields[0]['required'])) $err->add($i18n->getKey('error.field'), $custom_fields->fields[0]['label']);
if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($selected_date->after($browser_today))
if (defined('FUTURE_ENTRIES') && !isTrue(FUTURE_ENTRIES)) {
$browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
if ($selected_date->after($browser_today))
}
// Prohibit creating time entries in locked interval.
if($lockdate && $selected_date->before($lockdate))
}
// Prohibit creating time entries in locked interval.
if($lockdate && $selected_date->before($lockdate))
- if ($errors->no() && $uncompleted) {
- $errors->add($i18n->getKey('error.uncompleted_exists')." <a href = 'time_edit.php?id=".$not_completed_rec['id']."'>".$i18n->getKey('error.goto_uncompleted')."</a>");
+ if ($err->no() && $uncompleted) {
+ $err->add($i18n->getKey('error.uncompleted_exists')." <a href = 'time_edit.php?id=".$not_completed_rec['id']."'>".$i18n->getKey('error.goto_uncompleted')."</a>");
if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish))
if (ttTimeHelper::overlaps($user->getActiveUser(), $cl_date, $cl_start, $cl_finish))
$id = ttTimeHelper::insert(array(
'date' => $cl_date,
'user_id' => $user->getActiveUser(),
$id = ttTimeHelper::insert(array(
'date' => $cl_date,
'user_id' => $user->getActiveUser(),
} else {
// Cannot complete, redirect for manual edit.
header('Location: time_edit.php?id='.$record['id']);
} else {
// Cannot complete, redirect for manual edit.
header('Location: time_edit.php?id='.$record['id']);