summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-12-28 14:49:00 +0100
committermsquare <msquare@notrademark.de>2016-12-28 14:49:00 +0100
commit6c4bb0da3170ca365c6ef01991e26f26dd29fb30 (patch)
tree93d2d7473a0cfa754024031b6b4acdc5a3de5f89 /includes/view
parentcbeb45ef16a62095a44f14dc7a2ff7a20b947c74 (diff)
move data sorting to begin
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/ShiftCalendarRenderer.php15
1 files changed, 1 insertions, 14 deletions
diff --git a/includes/view/ShiftCalendarRenderer.php b/includes/view/ShiftCalendarRenderer.php
index 8c348567..8c8e72a4 100644
--- a/includes/view/ShiftCalendarRenderer.php
+++ b/includes/view/ShiftCalendarRenderer.php
@@ -150,26 +150,13 @@ class ShiftCalendarRenderer {
$html = "";
$rendered_until = $this->getFirstBlockStartTime();
- $needed_angeltypes = [];
- $shift_entries = [];
- foreach ($lane->getShifts() as $shift) {
- $needed_angeltypes[$shift['SID']] = [];
- $shift_entries[$shift['SID']] = [];
- }
- foreach ($this->needed_angeltypes as $needed_angeltype) {
- $needed_angeltypes[$needed_angeltype['SID']][] = $needed_angeltype;
- }
- foreach ($this->shift_entries as $shift_entry) {
- $shift_entries[$shift_entry['SID']][] = $shift_entry;
- }
-
foreach ($lane->getShifts() as $shift) {
while ($rendered_until + ShiftCalendarRenderer::SECONDS_PER_ROW <= $shift['start']) {
$html .= $this->renderTick($rendered_until);
$rendered_until += ShiftCalendarRenderer::SECONDS_PER_ROW;
}
- list($shift_height, $shift_html) = $shift_renderer->render($shift, $needed_angeltypes[$shift['SID']], $shift_entries[$shift['SID']], $user);
+ list($shift_height, $shift_html) = $shift_renderer->render($shift, $this->needed_angeltypes[$shift['SID']], $this->shift_entries[$shift['SID']], $user);
$html .= $shift_html;
$rendered_until += $shift_height * ShiftCalendarRenderer::SECONDS_PER_ROW;
}