From: Nik Okuntseff Date: Tue, 5 Mar 2019 15:57:11 +0000 (+0000) Subject: Renamed a function for clarity. X-Git-Tag: timetracker_1.19-1~222 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f3fe1f260bbb449253c86a6e08dae62957df468a;p=timetracker.git Renamed a function for clarity. --- diff --git a/WEB-INF/lib/ttTimesheetHelper.class.php b/WEB-INF/lib/ttTimesheetHelper.class.php index 391e9327..9d4919dc 100644 --- a/WEB-INF/lib/ttTimesheetHelper.class.php +++ b/WEB-INF/lib/ttTimesheetHelper.class.php @@ -287,9 +287,8 @@ class ttTimesheetHelper { return false; } - // submitTimesheet marks a timesheet as submitted and also sends an email - // to a selected approver. - static function submitTimesheet($fields) { + // markSubmitted marks a timesheet as submitted. + static function markSubmitted($fields) { global $user; $mdb2 = getConnection(); @@ -297,9 +296,6 @@ class ttTimesheetHelper { $group_id = $user->getGroup(); $org_id = $user->org_id; - // First, mark timesheet as submitted. - // Even if mail part below does not work, this will get us a functioning workflow - // without email notification. $timesheet_id = $fields['timesheet_id']; $sql = "update tt_timesheets set submit_status = 1". " where id = $timesheet_id and user_id = $user_id and group_id = $group_id and org_id = $org_id"; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index fe8ac9ff..06ab6141 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.52.4823 | Copyright © Anuko | +  Anuko Time Tracker 1.18.52.4824 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/timesheet_view.php b/timesheet_view.php index 0a3cc720..3dc80253 100644 --- a/timesheet_view.php +++ b/timesheet_view.php @@ -93,7 +93,7 @@ if ($request->isPost()) { if ($request->getParameter('btn_submit')) { $fields = array('timesheet_id' => $timesheet['id'], 'approver_id' => $approver_id); // TODO: obtain (and check) approver id above during access checks. - if (!ttTimesheetHelper::submitTimesheet($fields)) + if (!ttTimesheetHelper::markSubmitted($fields)) $err->add($i18n->get('error.db')); if ($err->no() && !ttTimesheetHelper::sendSubmitEmail($fields)) { $err->add($i18n->get('error.mail_send'));