summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-02-09 23:34:38 +0100
committerDaniel Friesel <derf@finalrewind.org>2013-02-09 23:34:38 +0100
commitbba7d1356b251275f4a89d538115be17b165623a (patch)
treec898a26293a44c2b298ab43f993439fed662fd1f
parent4411d419f3db93f4d805779bb092ed8bd57756c4 (diff)
replace '+x' lines by 'Verspätung ca. x Minuten' (as in reality)
-rw-r--r--cgi/index.pl7
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');
}