diff options
author | MaZderMind | 2015-10-05 17:28:37 +0200 |
---|---|---|
committer | MaZderMind | 2015-10-05 17:28:37 +0200 |
commit | 3d2439faecd44be86f2da5aa7cafff6eb2df0491 (patch) | |
tree | 3791b17276ddc0a36a3a3aa017d59647da325eb6 | |
parent | 1e80133967b65f94db26c6b3914a58b341d57eca (diff) |
fix js-errors with rooms in the schedule unknown to the streaming-ws
Diffstat (limited to '')
-rw-r--r-- | assets/js/lustiges-script.js | 3 | ||||
-rw-r--r-- | model/Schedule.php | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js index fff3896..15f0358 100644 --- a/assets/js/lustiges-script.js +++ b/assets/js/lustiges-script.js @@ -350,6 +350,9 @@ $(function() { $.each(talks, function(room, talk) { + if(!talk.known) + return; + if(talk.start < now) currentTalk = talk; 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; |