From d04134a691e2af71105290b120201031933c8b6e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 26 Oct 2015 08:50:30 +0100 Subject: _redirect: only shortcut to infoscreen if no error occured --- index.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.pl b/index.pl index 225b84b..8aa48b1 100644 --- a/index.pl +++ b/index.pl @@ -587,7 +587,11 @@ get '/_redirect' => sub { if ( $params->param('frontend') and $params->param('frontend') eq 'infoscreen' ) { - $suffix = '.html'; + my $data = get_results( $self->param('backend') // $default{backend}, + $city, $stop ); + if ( not $data->{errstr} ) { + $suffix = '.html'; + } } if ( $city -- cgit v1.2.3