summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-02-05 20:45:13 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-02-05 20:45:13 +0100
commitb13972296f64499debf19c309d3144f406c397c3 (patch)
tree1e66f25f93cd5bde84a3ce90c300e9e6e930bb2b
parent3d714495e68b097112e38fb2e45fcd1276b67b86 (diff)
hafas: show errors rather than location selection
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 5cb05c4..aa301fb 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -56,8 +56,13 @@ sub handle_no_results {
$candidate->[0] =~ s{[&]#x0028;}{(}g;
$candidate->[0] =~ s{[&]#x0029;}{)}g;
}
+ my $err;
+ if ( not $errstr =~ m{LOCATION} ) {
+ $err = $errstr;
+ }
$self->render(
'landingpage',
+ error => $err,
stationlist => \@candidates,
hide_opts => 0,
status => 300,