diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-06-08 22:18:31 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-06-08 22:18:31 +0200 |
commit | f71348a8a8b7d76e135efb32d94a61b2bd15711f (patch) | |
tree | 46e2562cbb5dc869f45488c2781978967067a9e2 /lib/Travelynx/Model/Journeys.pm | |
parent | c969424c2d27bd862354b29a43082ded885dc69f (diff) |
Store journey backend; do not rely on '|' in ID to distinguish IRIS/HAFAS
This is in preparation for supporting multiple HAFAS backends, and possibly
EFA and RIS::Journeys.
Diffstat (limited to 'lib/Travelynx/Model/Journeys.pm')
-rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 97c4681..280922b 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -218,6 +218,7 @@ sub add { edited => 0x3fff, cancelled => $opt{cancelled} ? 1 : 0, route => JSON->new->encode( \@route ), + backend_id => 1, }; if ( $opt{comment} ) { @@ -515,7 +516,7 @@ sub get { my @select = ( - qw(journey_id train_type train_line train_no checkin_ts sched_dep_ts real_dep_ts dep_eva dep_ds100 dep_name dep_lat dep_lon checkout_ts sched_arr_ts real_arr_ts arr_eva arr_ds100 arr_name arr_lat arr_lon cancelled edited route messages user_data visibility effective_visibility) + qw(journey_id is_iris is_hafas backend_name train_type train_line train_no checkin_ts sched_dep_ts real_dep_ts dep_eva dep_ds100 dep_name dep_lat dep_lon checkout_ts sched_arr_ts real_arr_ts arr_eva arr_ds100 arr_name arr_lat arr_lon cancelled edited route messages user_data visibility effective_visibility) ); my %where = ( user_id => $uid, @@ -573,6 +574,9 @@ sub get { my $ref = { id => $entry->{journey_id}, + is_iris => $entry->{is_iris}, + is_hafas => $entry->{is_hafas}, + backend_name => $entry->{backend_name}, type => $entry->{train_type}, line => $entry->{train_line}, no => $entry->{train_no}, |