From: Nik Okuntseff Date: Fri, 23 Mar 2018 22:01:49 +0000 (+0000) Subject: Added modification info to swap role operation. X-Git-Tag: timetracker_1.19-1~960 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a8334a66f49ce583f575ec1b4a71c7d746a1bcdc;p=timetracker.git Added modification info to swap role operation. --- diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 0d10a84f..de034794 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -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; diff --git a/WEB-INF/templates/admin_team_delete.tpl b/WEB-INF/templates/admin_team_delete.tpl index 865c3fa9..a8b0712f 100644 --- a/WEB-INF/templates/admin_team_delete.tpl +++ b/WEB-INF/templates/admin_team_delete.tpl @@ -10,7 +10,7 @@   - {$forms.teamForm.btn_delete.control}   + {$forms.teamForm.btn_delete.control}   {$forms.teamForm.btn_cancel.control} diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 2765c4c8..aaa0fd75 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.68.4148 | Copyright © Anuko | +  Anuko Time Tracker 1.17.68.4149 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}