Fix an edge case in which an event spans over adjacent slots but in different days
This commit is contained in:
parent
0eb9145e5a
commit
7d6ca43395
|
@ -194,7 +194,16 @@ function parseData($config, $data) {
|
||||||
$prevEventSlot[$hall_index] = $prevSlotIndex;
|
$prevEventSlot[$hall_index] = $prevSlotIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
$master_slot = &$events[$prevEventSlot[$hall_index]][$hall_index];
|
$masterSlotIndex = $prevEventSlot[$hall_index];
|
||||||
|
|
||||||
|
// check if the events spans on the next day
|
||||||
|
if (date('d.m', $microslots[$slot_index][0]) !== date('d.m', $microslots[$masterSlotIndex][1])) {
|
||||||
|
// not sure why this is needed, but it fixes things
|
||||||
|
$prevEventSlot[$hall_index] = null;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$master_slot = &$events[$masterSlotIndex][$hall_index];
|
||||||
|
|
||||||
if (!array_key_exists('rowspan', $master_slot)) {
|
if (!array_key_exists('rowspan', $master_slot)) {
|
||||||
$master_slot['rowspan'] = 2;
|
$master_slot['rowspan'] = 2;
|
||||||
|
|
Loading…
Reference in New Issue