X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=timesheet_edit.php;h=7919125a9ed6e28d3538b595baa71bc6764f3240;hb=840056890d9b574fcc62fdf386db346f133baa91;hp=1708bdf7c7a8891fa156bd9a79d8b35989e0ccd6;hpb=351514c0823db572768c8f4d7f9dbb4fad81447c;p=timetracker.git diff --git a/timesheet_edit.php b/timesheet_edit.php index 1708bdf7..7919125a 100644 --- a/timesheet_edit.php +++ b/timesheet_edit.php @@ -31,7 +31,7 @@ import('form.Form'); import('ttTimesheetHelper'); // Access checks. -if (!(ttAccessAllowed('manage_own_timesheets') || ttAccessAllowed('manage_timesheets'))) { +if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time'))) { header('Location: access_denied.php'); exit(); } @@ -53,7 +53,7 @@ if ($request->isPost()) { $cl_status = $request->getParameter('status'); } else { $cl_name = $timesheet['name']; - $cl_comment = $timesheet['submitter_comment']; + $cl_comment = $timesheet['comment']; $cl_status = $timesheet['status']; } @@ -73,13 +73,13 @@ if ($request->isPost()) { if ($request->getParameter('btn_save')) { if ($err->no()) { - $existing_timesheet = ttTimesheetHelper::getTimesheetByName($cl_name, $timesheet['user_id']); + $existing_timesheet = ttTimesheetHelper::getTimesheetByName($cl_name); if (!$existing_timesheet || ($cl_timesheet_id == $existing_timesheet['id'])) { // Update timesheet information. if (ttTimesheetHelper::update(array( 'id' => $cl_timesheet_id, 'name' => $cl_name, - 'submitter_comment' => $cl_comment, + 'comment' => $cl_comment, 'status' => $cl_status))) { header('Location: timesheets.php'); exit();