diff options
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/index.pl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cgi/index.pl b/cgi/index.pl index c5180e5..1613438 100644 --- a/cgi/index.pl +++ b/cgi/index.pl @@ -119,6 +119,9 @@ sub handle_request { my $delay = 0; if ($via) { my @route = $result->route; + if ( $result->isa('Travel::Status::DE::IRIS::Result') ) { + @route = $result->route_post; + } if ( not( any { $_ =~ m{$via}io } @route ) ) { next; } @@ -138,13 +141,13 @@ sub handle_request { $info = "Fahrt fällt aus: ${delaymsg}"; } elsif ( $result->delay and $result->delay > 0 ) { - if ($template eq 'clean') { - $info = $delaymsg; + if ( $template eq 'clean' ) { + $info = $delaymsg; $delay = $result->delay; } else { - $info = sprintf( 'Verspätung ca. %d Min.%s%s', - $result->delay, $delaymsg ? q{: } : q{}, $delaymsg ); + $info = sprintf( 'Verspätung ca. %d Min.%s%s', + $result->delay, $delaymsg ? q{: } : q{}, $delaymsg ); } } if ( $info and $qosmsg ) { |