X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/343dfea2506d317ae99b965667e1b62ea4d83480..086b93bd5a71b4c68ae3fa3e37d97182ee2a5b73:/timesheet_add.php diff --git a/timesheet_add.php b/timesheet_add.php index 4dd1afae..294886be 100644 --- a/timesheet_add.php +++ b/timesheet_add.php @@ -31,7 +31,7 @@ import('form.Form'); 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(); } @@ -90,12 +90,11 @@ if ($request->isPost()) { // 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