summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-06-02 17:54:06 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-06-02 17:54:06 +0200
commit86562f426d068b48849d0d268df179b46ed1a030 (patch)
treebdac8d2dfccfbcf4841178b49059246ad387034a /lib/DBInfoscreen
parentb3e1324c3961ac92782f8da00fe3b8ba573f4afa (diff)
Show HAFAS HIM messages in moreinfo2.3.0
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 758d370..5db9bbd 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -148,7 +148,7 @@ sub hafas_xml_req {
# <SDay text="... &gt; ..."> is invalid HTML, but present
# regardless. As it is the last tag, we just throw it away.
- $body =~ s{<SDay .*}{</Journey>}s;
+ $body =~ s{<SDay [^>]*/>}{}s;
my $tree;
@@ -958,6 +958,17 @@ sub handle_request {
}
}
}
+ if ( $him and @{$him} ) {
+ $departures[-1]{messages}{him} = $him;
+ for my $message ( @{$him} ) {
+ if ( $message->{display} ) {
+ unshift(
+ @{ $departures[-1]{moreinfo} },
+ [ $message->{header}, $message->{lead} ]
+ );
+ }
+ }
+ }
}
}
else {