diff options
author | Daniel Friesel <derf@finalrewind.org> | 2013-02-09 23:34:38 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2013-02-09 23:34:38 +0100 |
commit | bba7d1356b251275f4a89d538115be17b165623a (patch) | |
tree | c898a26293a44c2b298ab43f993439fed662fd1f | |
parent | 4411d419f3db93f4d805779bb092ed8bd57756c4 (diff) |
replace '+x' lines by 'Verspätung ca. x Minuten' (as in reality)
-rw-r--r-- | cgi/index.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cgi/index.pl b/cgi/index.pl index 1b49e98..6fdfcb8 100644 --- a/cgi/index.pl +++ b/cgi/index.pl @@ -81,9 +81,12 @@ sub handle_request { } my $info = $result->info; - if ($info eq '+0') { + if ( $info eq '+0' ) { $info = undef; } + if ( $info and $info =~ m{ ^ \+ (\d+) $ }ox ) { + $info = "Verspaetung ca. $1 Minuten"; + } push( @departures, { @@ -114,7 +117,7 @@ get '/_redirect' => sub { $params->remove('station'); $params->remove('via'); - if ($params->param('mode') and $params->param('mode') eq 'multi') { + if ( $params->param('mode') and $params->param('mode') eq 'multi' ) { $params->remove('mode'); } |