summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Controller')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 39c8e8f..b64fcfa 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -667,6 +667,9 @@ sub travel_action {
my ( $still_checked_in, undef ) = @_;
if ( my $destination = $params->{dest} ) {
my $station_link = '/s/' . $destination;
+ if ( $status->{train_id} =~ m{[|]} ) {
+ $station_link .= '?hafas=1';
+ }
$self->render(
json => {
success => 1,
@@ -692,6 +695,7 @@ sub travel_action {
}
elsif ( $params->{action} eq 'checkout' ) {
$self->render_later;
+ my $status = $self->get_user_status;
$self->checkout_p(
station => $params->{station},
force => $params->{force}
@@ -699,6 +703,9 @@ sub travel_action {
sub {
my ( $still_checked_in, $error ) = @_;
my $station_link = '/s/' . $params->{station};
+ if ( $status->{train_id} =~ m{[|]} ) {
+ $station_link .= '?hafas=1';
+ }
if ($error) {
$self->render(
@@ -747,11 +754,11 @@ sub travel_action {
else {
my $redir = '/';
if ( $status->{checked_in} or $status->{cancelled} ) {
- if ( $status->{dep_ds100} ) {
- $redir = '/s/' . $status->{dep_ds100};
+ if ( $status->{train_id} =~ m{[|]} ) {
+ $redir = '/s/' . $status->{dep_eva} . '?hafas=1';
}
else {
- $redir = '/s/' . $status->{dep_eva} . '?hafas=1';
+ $redir = '/s/' . $status->{dep_ds100};
}
}
$self->render(