From efa20faf8c5392c10ecb5af23dac9fa541054a27 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 27 Jun 2014 19:26:33 +0200 Subject: fix route filter for iris backend (use ruote_post) --- cgi/index.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cgi') 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 ) { -- cgit v1.2.3