summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2019-08-21 01:25:53 +0200
committermsquare <msquare@notrademark.de>2019-08-21 01:26:01 +0200
commita521ace9f7648029ff69d4777bdcc20517e91e95 (patch)
tree7338f666eb923e9c97a315c27a935d54e8c50f67 /includes
parenta1bb019af61228af6ee94d1f284b7c4130e3bff3 (diff)
fix shift view bug
Diffstat (limited to 'includes')
-rw-r--r--includes/controller/shifts_controller.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/controller/shifts_controller.php b/includes/controller/shifts_controller.php
index caf124ba..804c7f32 100644
--- a/includes/controller/shifts_controller.php
+++ b/includes/controller/shifts_controller.php
@@ -269,11 +269,12 @@ function shift_controller()
$shifttype = ShiftType($shift['shifttype_id']);
$room = Room($shift['RID']);
- $angeltypes = AngelTypes();
+ $angeltypes_source = AngelTypes();
+ $angeltypes = [];
$user_shifts = Shifts_by_user($user->id);
$shift_signup_state = new ShiftSignupState(ShiftSignupState::OCCUPIED, 0);
- foreach ($angeltypes as &$angeltype) {
+ foreach ($angeltypes_source as &$angeltype) {
$needed_angeltype = NeededAngeltype_by_Shift_and_Angeltype($shift, $angeltype);
if (empty($needed_angeltype)) {
continue;
@@ -292,6 +293,7 @@ function shift_controller()
);
$shift_signup_state->combineWith($angeltype_signup_state);
$angeltype['shift_signup_state'] = $angeltype_signup_state;
+ $angeltypes[] = $angeltype;
}
return [