From f340e538c5e269b9035905e808220a5683b079c4 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Wed, 21 Mar 2018 22:00:26 +0000 Subject: [PATCH] Added modification info to team updates. --- WEB-INF/lib/ttTeamHelper.class.php | 4 +++- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 74ef5545..6dede8b2 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -867,6 +867,7 @@ class ttTeamHelper { // The update function updates team information. static function update($team_id, $fields) { + global $user; $mdb2 = getConnection(); $name_part = 'name = '.$mdb2->quote($fields['name']); $currency_part = ''; @@ -897,10 +898,11 @@ class ttTeamHelper { if (isset($fields['config'])) $config_part = ', config = '.$mdb2->quote($fields['config']); if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); if (isset($fields['workday_minutes'])) $workday_minutes_part = ', workday_minutes = '.$mdb2->quote($fields['workday_minutes']); + $modified_part = ', modified = now(), modified_ip = '.$mdb2->quote($_SERVER['REMOTE_ADDR']).', modified_by = '.$mdb2->quote($user->id); $sql = "update tt_teams set $name_part $currency_part $lang_part $decimal_mark_part $date_format_part $time_format_part $week_start_part $tracking_mode_part $task_required_part $record_type_part - $bcc_email_part $plugins_part $config_part $lock_spec_part $workday_minutes_part where id = $team_id"; + $bcc_email_part $plugins_part $config_part $lock_spec_part $workday_minutes_part $modified_part where id = $team_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 54e00f39..d45f4d94 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.65.4129 | Copyright © Anuko | +  Anuko Time Tracker 1.17.65.4130 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1