aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--model/Schedule.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/model/Schedule.php b/model/Schedule.php
index 712ecf8..d006d1f 100644
--- a/model/Schedule.php
+++ b/model/Schedule.php
@@ -138,6 +138,7 @@ class Schedule
foreach($rooms as $roomName)
{
$roomidx++;
+ $laststart = false;
$lastend = false;
if($this->isRoomFiltered($roomName))
@@ -187,6 +188,10 @@ class Schedule
$duration = $this->strToDuration((string)$event->duration);
$end = $start + $duration;
+ // skip duplicate events in fahrplan source
+ if ( $laststart == $start )
+ continue;
+
if($lastend && $lastend < $start)
{
// synthesize pause event
@@ -219,11 +224,11 @@ class Schedule
);
}
- $personnames = array();
- if(isset($event->persons)) foreach($event->persons->person as $person)
- $personnames[] = (string)$person;
+ $personnames = array();
+ if(isset($event->persons)) foreach($event->persons->person as $person)
+ $personnames[] = (string)$person;
- $program[$roomName][] = array(
+ $program[$roomName][] = array(
'title' => (string)$event->title,
'speaker' => implode(', ', $personnames),
@@ -237,6 +242,7 @@ class Schedule
'optout' => $this->isOptout($event),
);
+ $laststart = $start;
$lastend = $end;
}