summaryrefslogtreecommitdiff
path: root/includes/controller/shifts_controller.php
diff options
context:
space:
mode:
authorleaneb <lea-e@bluewin.ch>2016-11-24 22:29:06 +0100
committerGitHub <noreply@github.com>2016-11-24 22:29:06 +0100
commit96728fedd76069175bcb3462b1fbdd38b47e00f7 (patch)
tree2bd52191c3e67c7117090be669bb76812d3151e1 /includes/controller/shifts_controller.php
parent4116e0114e94f7c4ee5dba686c029b7e988bd7b3 (diff)
parent07e8d8dfbd9bdcfbaecf12894bc0e3cfb9e0126e (diff)
Merge pull request #1 from engelsystem/master
Merge with Master
Diffstat (limited to 'includes/controller/shifts_controller.php')
-rw-r--r--includes/controller/shifts_controller.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php
index f273c097..1500b449 100644
--- a/includes/controller/shifts_controller.php
+++ b/includes/controller/shifts_controller.php
@@ -1,5 +1,6 @@
<?php
+use Engelsystem\ShiftSignupState;
function shift_link($shift) {
return page_link_to('shifts') . '&action=view&shift_id=' . $shift['SID'];
}
@@ -200,13 +201,13 @@ function shift_controller() {
$angeltypes = AngelTypes();
$user_shifts = Shifts_by_user($user);
- $shift_signup_state = null;
+ $shift_signup_state = new ShiftSignupState(ShiftSignupState::OCCUPIED, 0);
foreach ($angeltypes as $angeltype) {
$angeltype_signup_state = Shift_signup_allowed($user, $shift, $angeltype, null, $user_shifts);
if ($shift_signup_state == null) {
$shift_signup_state = $angeltype_signup_state;
} else {
- $shift_signup_state = $shift_signup_state->combineWith($angeltype_signup_state);
+ $shift_signup_state->combineWith($angeltype_signup_state);
}
}