diff options
Diffstat (limited to '')
-rw-r--r-- | lib/config.php | 7 | ||||
-rw-r--r-- | lib/program.php | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/lib/config.php b/lib/config.php index 473bc56..7053cd7 100644 --- a/lib/config.php +++ b/lib/config.php @@ -29,3 +29,10 @@ $GLOBALS['CONFIG']['FORMATS'] = array( 'audio' => 'Audio', 'slides' => 'Slide-Images', ); + +// various room-name nappings +$GLOBALS['CONFIG']['FAHRPLAN_ROOM_MAPPING'] = array( + 'Grossbaustelle BER' => 'saal1', + 'Tiefbaustelle S21' => 'saal2', + 'Hochbaustelle Elbphilharmonie' => 'saal6', +); diff --git a/lib/program.php b/lib/program.php index cc8025d..0f038a8 100644 --- a/lib/program.php +++ b/lib/program.php @@ -46,8 +46,10 @@ function program() foreach($day->room as $room) { $roomidx++; - $name = (string)$room['name']; $lastend = false; + $name = (string)$room['name']; + if(isset($GLOBALS['CONFIG']['FAHRPLAN_ROOM_MAPPING'][$name])) + $name = $GLOBALS['CONFIG']['FAHRPLAN_ROOM_MAPPING'][$name]; foreach($room->event as $event) { @@ -85,8 +87,13 @@ function program() ); } - $program[$name][] = array( + $personnames = array(); + foreach($event->persons->person as $person) + $personnames[] = (string)$person; + + $program[$name][] = array( 'title' => (string)$event->title, + 'speaker' => implode(', ', $personnames), 'fstart' => date('c', $start), 'fend' => date('c', $end), |