From 27895f2639861f84762ce4fd7731da53bf5dfd3d Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Wed, 21 Aug 2019 01:20:46 +0200 Subject: Shift signup/signout: Be more verbose --- includes/model/ShiftEntry_model.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'includes/model/ShiftEntry_model.php') 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']) -- cgit v1.2.3-70-g09d2