Added modification info to swap role operation.
authorNik Okuntseff <support@anuko.com>
Fri, 23 Mar 2018 22:01:49 +0000 (22:01 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 23 Mar 2018 22:01:49 +0000 (22:01 +0000)
WEB-INF/lib/ttTeamHelper.class.php
WEB-INF/templates/admin_team_delete.tpl
WEB-INF/templates/footer.tpl

index 0d10a84..de03479 100644 (file)
@@ -116,14 +116,16 @@ class ttTeamHelper {
     if (!$val['id'] || !$val['role_id'])
       return false;
 
+    $modified_part = ', modified = now(), modified_ip = '.$mdb2->quote($_SERVER['REMOTE_ADDR']).', modified_by = '.$mdb2->quote($user->id);
+
     // Promote user.
-    $sql = "update tt_users set role_id = $user->role_id where id = $user_id and team_id = $user->team_id";
+    $sql = "update tt_users set role_id = $user->role_id".$modified_part." where id = $user_id and team_id = $user->team_id";
     $affected = $mdb2->exec($sql);
     if (is_a($affected, 'PEAR_Error')) return false;
 
     // Demote self.
     $role_id = $val['role_id'];
-    $sql = "update tt_users set role_id = $role_id where id = $user->id and team_id = $user->team_id";
+    $sql = "update tt_users set role_id = $role_id".$modified_part." where id = $user->id and team_id = $user->team_id";
     $affected = $mdb2->exec($sql);
     if (is_a($affected, 'PEAR_Error')) return false;
 
index 865c3fa..a8b0712 100644 (file)
@@ -10,7 +10,7 @@
           <td colspan="2" align="center">&nbsp;</td>
         </tr>
         <tr>
-          <td align="right">{$forms.teamForm.btn_delete.control} &nbsp;</td>
+          <td align="right">{$forms.teamForm.btn_delete.control}&nbsp;</td>
           <td align="left">&nbsp;{$forms.teamForm.btn_cancel.control}</td>
         </tr>
       </table>
index 2765c4c..aaa0fd7 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.68.4148 | 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.68.4149 | 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>