import('ttTimesheetHelper');
// Access checks.
-if (!(ttAccessAllowed('manage_own_timesheets') || ttAccessAllowed('manage_timesheets') || ttAccessAllowed('manage_all_timesheets'))) {
+if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time'))) {
header('Location: access_denied.php');
exit();
}
// Finished validating user input.
if ($err->no()) {
- /*
- if (ttTimesheetHelper::insert($fields)) {
+ if (ttTimesheetHelper::createTimesheet($fields)) {
header('Location: timesheets.php');
exit();
} else
- $err->add($i18n->get('error.db'));*/
+ $err->add($i18n->get('error.db'));
}
} // isPost