X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/5d4953bb5ec09e6e79a114c71f53f410c6064f2e..fc8a4455218bc71e17697f33c111b9dbc55f8047:/timesheet_edit.php diff --git a/timesheet_edit.php b/timesheet_edit.php index 84461546..e98d824f 100644 --- a/timesheet_edit.php +++ b/timesheet_edit.php @@ -71,26 +71,22 @@ if ($request->isPost()) { if (!ttValidString($cl_comment, true)) $err->add($i18n->get('error.field'), $i18n->get('label.comment')); if ($err->no()) { - /* - // TODO: coding ongoing down from here. if ($request->getParameter('btn_save')) { - $existing_project = ttProjectHelper::getProjectByName($cl_name); - if (!$existing_project || ($cl_project_id == $existing_project['id'])) { + $existing_timesheet = ttTimesheetHelper::getTimesheetByName($cl_name); + if (!$existing_timesheet || ($cl_timesheet_id == $existing_timesheet['id'])) { // Update project information. - if (ttProjectHelper::update(array( - 'id' => $cl_project_id, + if (ttTimesheetHelper::update(array( + 'id' => $cl_timesheet_id, 'name' => $cl_name, - 'description' => $cl_description, - 'status' => $cl_status, - 'users' => $cl_users, - 'tasks' => $cl_tasks))) { - header('Location: projects.php'); + 'submitter_comment' => $cl_comment, + 'status' => $cl_status))) { + header('Location: timesheets.php'); exit(); } else $err->add($i18n->get('error.db')); } else $err->add($i18n->get('error.object_exists')); - }*/ + } } } // isPost