Added import timestamp and IP for team import operation.
authorNik Okuntseff <support@anuko.com>
Tue, 27 Mar 2018 16:11:35 +0000 (16:11 +0000)
committerNik Okuntseff <support@anuko.com>
Tue, 27 Mar 2018 16:11:35 +0000 (16:11 +0000)
WEB-INF/lib/ttTeamHelper.class.php
WEB-INF/templates/footer.tpl

index fb74d8e..2aff793 100644 (file)
@@ -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);
 
index 31553a4..d3cf389 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.17.76.4186 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.17.76.4187 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>