From 3d2439faecd44be86f2da5aa7cafff6eb2df0491 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Mon, 5 Oct 2015 17:28:37 +0200 Subject: fix js-errors with rooms in the schedule unknown to the streaming-ws --- model/Schedule.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'model/Schedule.php') diff --git a/model/Schedule.php b/model/Schedule.php index bce1719..d4e9acc 100644 --- a/model/Schedule.php +++ b/model/Schedule.php @@ -102,7 +102,9 @@ class Schedule extends ModelBase if($this->isRoomFiltered($name)) continue; - if(isset($mapping[$name])) + $room_known = isset($mapping[$name]); + + if($room_known) $name = $mapping[$name]; foreach($room->event as $event) @@ -125,6 +127,7 @@ class Schedule extends ModelBase 'start' => $lastend, 'end' => $start, 'duration' => $pauseduration, + 'room_known' => $room_known, ); } else if(!$lastend && $daystart < $start) @@ -138,6 +141,7 @@ class Schedule extends ModelBase 'start' => $daystart, 'end' => $start, 'duration' => $start - $daystart, + 'room_known' => $room_known, ); } @@ -155,6 +159,7 @@ class Schedule extends ModelBase 'start' => $start, 'end' => $end, 'duration' => $duration, + 'room_known' => $room_known, ); $lastend = $end; -- cgit v1.2.3