diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-12-07 15:30:47 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-12-07 15:30:47 +0100 |
commit | 00fca1a3d819da7891d17bf6208a2e0de420d14c (patch) | |
tree | 683d9536f5fd24aeeea621b88e4277791718e5ec | |
parent | 3cb5e32cb9ecb4835b1bc71e2e851b9691328eba (diff) |
json: Add additional_stops and canceled_stops
-rw-r--r-- | index.pl | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -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 ], } ); } |