summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-10-26 08:50:30 +0100
committerDaniel Friesel <derf@finalrewind.org>2015-10-26 08:50:30 +0100
commitd04134a691e2af71105290b120201031933c8b6e (patch)
treecf37f106f184cd9f6da20c1c878609e00325e16f
parent75a26a81de56b186ec17434323b3945332cee613 (diff)
_redirect: only shortcut to infoscreen if no error occured
-rw-r--r--index.pl6
1 files changed, 5 insertions, 1 deletions
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