diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-09-17 15:50:11 +0200 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-09-17 15:50:11 +0200 | 
| commit | 8810acf742629294713448408ab6f0719f17952f (patch) | |
| tree | 931004567b4cc21d7da7a3da38bb4d420436f4fb /lib/Travelynx/Controller | |
| parent | a5804691f67ea22fd2e7e61b329a70442000dc59 (diff) | |
/s: support filter by trip_id; only allow train filter in IRIS mode2.2.2
Diffstat (limited to 'lib/Travelynx/Controller')
| -rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 7ee04e0..28427ad 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -905,6 +905,7 @@ sub station {  	my ($self)  = @_;  	my $station = $self->stash('station');  	my $train   = $self->param('train'); +	my $trip_id = $self->param('trip_id');  	my $uid     = $self->current_user->{id};  	my @timeline = $self->in_transit->get_timeline( @@ -1000,7 +1001,10 @@ sub station {  			}  			my $connections_p; -			if ($train) { +			if ( $trip_id and $use_hafas ) { +				@results = grep { $_->id eq $trip_id } @results; +			} +			elsif ( $train and not $use_hafas ) {  				@results  				  = grep { $_->type . ' ' . $_->train_no eq $train } @results;  			} | 
