diff options
Diffstat (limited to 'includes/controller/user_worklog_controller.php')
-rw-r--r-- | includes/controller/user_worklog_controller.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/controller/user_worklog_controller.php b/includes/controller/user_worklog_controller.php index ba91534b..bd62c83c 100644 --- a/includes/controller/user_worklog_controller.php +++ b/includes/controller/user_worklog_controller.php @@ -69,6 +69,12 @@ function user_worklog_from_request($userWorkLog) $valid = true; + $userWorkLog['work_timestamp'] = parse_date('Y-m-d H:i', $request->input('work_timestamp') . ' 00:00'); + if ($userWorkLog['work_timestamp'] == null) { + $valid = false; + error(_('Please enter work date.')); + } + $userWorkLog['work_hours'] = $request->input('work_hours'); if (! preg_match("/[0-9]+(\.[0-9]+)?/", $userWorkLog['work_hours'])) { $valid = false; |