diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-11-19 19:46:21 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-11-19 19:46:39 +0100 |
commit | b80613b8a8dad252960d90f6a03227503e2ba133 (patch) | |
tree | b861525de6e5bb54ca24ace890423570c8849e96 /lib/Travelynx/Controller/Traveling.pm | |
parent | 13e59b3aa1504154a90619069c963301e322904a (diff) |
allow route input when adding journeys manually (#26)
Diffstat (limited to 'lib/Travelynx/Controller/Traveling.pm')
-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 f0f1879..c8f975f 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -803,10 +803,14 @@ sub add_journey_form { $opt{rt_departure} //= $opt{sched_departure}; $opt{rt_arrival} //= $opt{sched_arrival}; - for my $key (qw(dep_station arr_station cancelled comment)) { + for my $key (qw(dep_station arr_station route cancelled comment)) { $opt{$key} = $self->param($key); } + if ( $opt{route} ) { + $opt{route} = [ split( qr{\r?\n\r?}, $opt{route} ) ]; + } + my $db = $self->pg->db; my $tx = $db->begin; |