diff options
author | msquare <msquare@notrademark.de> | 2016-12-27 23:02:05 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-12-27 23:02:05 +0100 |
commit | 46528fe1d888ae09d125c2ae8ac1952f1d7f29f6 (patch) | |
tree | b8361bb6aff1307845c9903d2693121835e8d033 /includes/controller/shift_entries_controller.php | |
parent | ffc33993d4cea15d4d8a4af631afdd97c3567c36 (diff) |
shift view performance improvements
Diffstat (limited to 'includes/controller/shift_entries_controller.php')
-rw-r--r-- | includes/controller/shift_entries_controller.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php index 32c94a6b..d0a12288 100644 --- a/includes/controller/shift_entries_controller.php +++ b/includes/controller/shift_entries_controller.php @@ -48,7 +48,10 @@ function shift_entry_add_controller() { $user_id = $user['UID']; } - $shift_signup_allowed = Shift_signup_allowed(User($user_id), $shift, $type); + $needed_angeltype = NeededAngeltype_by_Shift_and_Angeltype($shift, $type); + $shift_entries = ShiftEntries_by_shift_and_angeltype($shift['SID'], $type['id']); + + $shift_signup_allowed = Shift_signup_allowed(User($user_id), $shift, $type, null, null, $needed_angeltype, $shift_entries); if (! $shift_signup_allowed->isSignupAllowed()) { error(_("You are not allowed to sign up for this shift. Maybe shift is full or already running.")); redirect(shift_link($shift)); |