diff options
author | msquare <msquare@notrademark.de> | 2016-12-27 19:13:24 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-12-27 19:13:24 +0100 |
commit | 2840bb61988b242e7833232ad6ba56cd3f924854 (patch) | |
tree | 741c5d5e2b4db350f290d271a1d842e8cabf8188 /includes/model | |
parent | d0e924ba25d288ce9f89373adeaba58185f855bd (diff) |
no signup for shifts for angels that are not arrived
Diffstat (limited to 'includes/model')
-rw-r--r-- | includes/model/Shifts_model.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index 74cfa356..e45c54ac 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -121,6 +121,10 @@ function Shift_free_entries($shift_id, $angeltype_id) { function Shift_signup_allowed_angel($user, $shift, $angeltype, $user_angeltype, $user_shifts, $angeltype_supporter = false) { $free_entries = Shift_free_entries($shift['SID'], $angeltype['id']); + if($user['Gekommen'] == 0) { + return new ShiftSignupState(ShiftSignupState::SHIFT_ENDED, $free_entries); + } + if ($user_shifts == null) { $user_shifts = Shifts_by_user($user); } |