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/view/Shifts_view.php | |
parent | ffc33993d4cea15d4d8a4af631afdd97c3567c36 (diff) |
shift view performance improvements
Diffstat (limited to 'includes/view/Shifts_view.php')
-rw-r--r-- | includes/view/Shifts_view.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php index bd4f19c3..c2c0912e 100644 --- a/includes/view/Shifts_view.php +++ b/includes/view/Shifts_view.php @@ -14,13 +14,12 @@ function Shift_editor_info_render($shift) { function Shift_signup_button_render($shift, $angeltype, $user_angeltype = null, $user_shifts = null) { global $user; - + if ($user_angeltype == null) { $user_angeltype = UserAngelType_by_User_and_AngelType($user, $angeltype); } - $shift_signup_state = Shift_signup_allowed($user, $shift, $angeltype, $user_angeltype, $user_shifts); - if ($shift_signup_state->isSignupAllowed()) { + if ($angeltype['shift_signup_state']->isSignupAllowed()) { return button(page_link_to('user_shifts') . '&shift_id=' . $shift['SID'] . '&type_id=' . $angeltype['id'], _('Sign up')); } elseif ($user_angeltype == null) { return button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], sprintf(_('Become %s'), $angeltype['name'])); |