summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2019-08-21 01:30:53 +0200
committerGitHub <noreply@github.com>2019-08-21 01:30:53 +0200
commit4d4fb81cd3dbe276f684feecd03c8fc49c700df0 (patch)
treede8a71b6f07c8bc3a59e7af126944404a0448dfe
parent548d7317b43a385febd2f43f3ee7f80fa76d5ac0 (diff)
parent27895f2639861f84762ce4fd7731da53bf5dfd3d (diff)
Merge pull request #641 from MyIgel/shift-signup-log
Shift signup/signout: Be more verbose
-rw-r--r--includes/model/ShiftEntry_model.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php
index a017a32c..5dd11421 100644
--- a/includes/model/ShiftEntry_model.php
+++ b/includes/model/ShiftEntry_model.php
@@ -73,6 +73,9 @@ function ShiftEntry_create($shift_entry)
{
$user = User::find($shift_entry['UID']);
$shift = Shift($shift_entry['SID']);
+ $shifttype = ShiftType($shift['shifttype_id']);
+ $room = Room($shift['RID']);
+ $angeltype = AngelType($shift_entry['TID']);
$result = DB::insert('
INSERT INTO `ShiftEntry` (
`SID`,
@@ -96,8 +99,11 @@ function ShiftEntry_create($shift_entry)
engelsystem_log(
'User ' . User_Nick_render($user, true)
. ' signed up for shift ' . $shift['name']
+ . ' (' . $shifttype['name'] . ')'
+ . ' at ' . $room['Name']
. ' from ' . date('Y-m-d H:i', $shift['start'])
. ' to ' . date('Y-m-d H:i', $shift['end'])
+ . ' as ' . $angeltype['name']
);
mail_shift_assign($user, $shift);
@@ -156,7 +162,9 @@ function ShiftEntry_delete($shiftEntry)
$angeltype = AngelType($shiftEntry['TID']);
engelsystem_log(
- 'Shift signout: ' . User_Nick_render($signout_user, true) . ' from shift ' . $shifttype['name']
+ 'Shift signout: ' . User_Nick_render($signout_user, true)
+ . ' from shift ' . $shift['name']
+ . ' (' . $shifttype['name'] . ')'
. ' at ' . $room['Name']
. ' from ' . date('Y-m-d H:i', $shift['start'])
. ' to ' . date('Y-m-d H:i', $shift['end'])