From 3209a25c21cd59c6476d820624545963a5a4a857 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 27 Mar 2018 16:11:35 +0000 Subject: [PATCH] Added import timestamp and IP for team import operation. --- WEB-INF/lib/ttTeamHelper.class.php | 4 ++++ WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index fb74d8e1..2aff793b 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -756,6 +756,7 @@ class ttTeamHelper { // The insert function creates a new team. static function insert($fields) { + global $user; $mdb2 = getConnection(); // Start with team name and currency. @@ -838,6 +839,9 @@ class ttTeamHelper { $values .= ', '.$mdb2->quote($fields['config']); } + $columns .= ', created, created_ip, created_by'; + $values .= ', now(), '.$mdb2->quote($_SERVER['REMOTE_ADDR']).', '.$mdb2->quote($user->id); + $sql = "insert into tt_teams ($columns) values($values)"; $affected = $mdb2->exec($sql); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 31553a4f..d3cf3890 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.76.4186 | Copyright © Anuko | +  Anuko Time Tracker 1.17.76.4187 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1