summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-12-07 15:30:47 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-12-07 15:30:47 +0100
commit00fca1a3d819da7891d17bf6208a2e0de420d14c (patch)
tree683d9536f5fd24aeeea621b88e4277791718e5ec /index.pl
parent3cb5e32cb9ecb4835b1bc71e2e851b9691328eba (diff)
json: Add additional_stops and canceled_stops
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl18
1 files changed, 13 insertions, 5 deletions
diff --git a/index.pl b/index.pl
index 10ea6b0..261753d 100644
--- a/index.pl
+++ b/index.pl
@@ -256,8 +256,12 @@ sub handle_request {
. $additional_line
. ( $info ? ' +++ ' : q{} )
. $info;
- push( @{$moreinfo},
- [ 'Zusätzliche Halte', $additional_line ] );
+ if ( $template ne 'marudor_v1' ) {
+ push(
+ @{$moreinfo},
+ [ 'Zusätzliche Halte', $additional_line ]
+ );
+ }
}
if ( $result->canceled_stops and not $result->is_cancelled ) {
@@ -267,7 +271,9 @@ sub handle_request {
. $cancel_line
. ( $info ? ' +++ ' : q{} )
. $info;
- push( @{$moreinfo}, [ 'Ohne Halt in', $cancel_line ] );
+ if ( $template ne 'marudor_v1' ) {
+ push( @{$moreinfo}, [ 'Ohne Halt in', $cancel_line ] );
+ }
}
push( @{$moreinfo}, $result->messages );
@@ -328,8 +334,10 @@ sub handle_request {
is_cancelled => $result->can('is_cancelled')
? $result->is_cancelled
: undef,
- moreinfo => $moreinfo,
- delay => $delay,
+ moreinfo => $moreinfo,
+ delay => $delay,
+ additional_stops => [ $result->additional_stops ],
+ canceled_stops => [ $result->canceled_stops ],
}
);
}