diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-10-11 01:26:34 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-10-31 13:43:23 +0100 |
commit | 4e09ee3eb255160c88a378375d69123a3e000497 (patch) | |
tree | e4a03ff40c939473cc1278f8286675cfa31e4556 /includes/model/ShiftEntry_model.php | |
parent | 7c6afc2bfe3263b91ecabf5530da57fe1162ea0b (diff) |
Replaced more user related stuff
(Contains some buggy stuff too...)
Diffstat (limited to 'includes/model/ShiftEntry_model.php')
-rw-r--r-- | includes/model/ShiftEntry_model.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php index c8ca5ef4..593e40b2 100644 --- a/includes/model/ShiftEntry_model.php +++ b/includes/model/ShiftEntry_model.php @@ -77,7 +77,6 @@ function ShiftEntry_create($shift_entry) { $user = User::find($shift_entry['UID']); $shift = Shift($shift_entry['SID']); - mail_shift_assign($user, $shift); $result = DB::insert(' INSERT INTO `ShiftEntry` ( `SID`, @@ -104,6 +103,7 @@ function ShiftEntry_create($shift_entry) . ' from ' . date('Y-m-d H:i', $shift['start']) . ' to ' . date('Y-m-d H:i', $shift['end']) ); + mail_shift_assign($user, $shift); return $result; } @@ -151,7 +151,6 @@ function ShiftEntry($shift_entry_id) */ function ShiftEntry_delete($shiftEntry) { - mail_shift_removed(User::find($shiftEntry['UID']), Shift($shiftEntry['SID'])); DB::delete('DELETE FROM `ShiftEntry` WHERE `id` = ?', [$shiftEntry['id']]); $signout_user = User::find($shiftEntry['UID']); @@ -167,6 +166,8 @@ function ShiftEntry_delete($shiftEntry) . ' to ' . date('Y-m-d H:i', $shift['end']) . ' as ' . $angeltype['name'] ); + + mail_shift_removed(User::find($shiftEntry['UID']), Shift($shiftEntry['SID'])); } /** |