summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-01-21 16:29:18 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-01-21 16:29:18 +0100
commit32afee9946595dc615ea1c78ae184a6e13a9722e (patch)
tree157eea04bd242e76e75b6d3f51b4dbee9732de4e /index.pl
parent7d0a0942ac90dd6fce9c4e9122c654a75c22b591 (diff)
show real station name in title
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/index.pl b/index.pl
index 4e42930..2795d7f 100644
--- a/index.pl
+++ b/index.pl
@@ -80,8 +80,9 @@ sub get_results_for {
%opt
);
$data = {
- results => [ $status->results ],
- errstr => $status->errstr,
+ results => [ $status->results ],
+ errstr => $status->errstr,
+ station_name => $status->station->{name},
};
}
elsif ( $backend eq 'ris' ) {
@@ -753,11 +754,12 @@ sub handle_request {
}
}
else {
+ my $station_name = $data->{station_name} // $station;
$self->render(
$template,
departures => \@departures,
version => $VERSION,
- title => "Abfahrtsmonitor ${station}",
+ title => "Abfahrtsmonitor $station_name",
refresh_interval => $refresh_interval + 3,
hide_opts => $hide_opts,
hide_low_delay => $hide_low_delay,