summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-11-19 19:46:21 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2019-11-19 19:46:39 +0100
commitb80613b8a8dad252960d90f6a03227503e2ba133 (patch)
treeb861525de6e5bb54ca24ace890423570c8849e96 /lib/Travelynx
parent13e59b3aa1504154a90619069c963301e322904a (diff)
allow route input when adding journeys manually (#26)
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm6
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;