summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-12-08 19:46:45 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-12-08 19:46:45 +0100
commit315a94affedffda8ab4be62cebf2b62c3f5f0d78 (patch)
treef10f35f59aa35860ec9b67e1ba2754864de82d89 /lib/Travelynx.pm
parent561ff4574bb6078ce4c9f72647a9c3d1a92cac6e (diff)
allow a journey's cancellation status to be edited1.11.1
Closes #27
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index e1cca7d..3bb33ea 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -184,6 +184,7 @@ sub startup {
sched_departure => 0x0001,
real_departure => 0x0002,
route => 0x0010,
+ is_cancelled => 0x0020,
sched_arrival => 0x0100,
real_arrival => 0x0200,
};
@@ -896,6 +897,18 @@ sub startup {
}
)->rows;
}
+ elsif ( $key eq 'cancelled' ) {
+ $rows = $db->update(
+ 'journeys',
+ {
+ cancelled => $value,
+ edited => $journey->{edited} | 0x0020,
+ },
+ {
+ id => $journey_id,
+ }
+ )->rows;
+ }
elsif ( $key eq 'comment' ) {
$journey->{user_data}{comment} = $value;
$rows = $db->update(