mirror of
https://github.com/derf/travelynx
synced 2025-02-27 20:57:09 +00:00
inconsistent journeys: link to journeys
This commit is contained in:
parent
f115283cb8
commit
6b4a82da32
4 changed files with 27 additions and 4 deletions
|
@ -1287,6 +1287,19 @@ my @migrations = (
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# v30 -> v31
|
||||||
|
# travelynx v1.29.17 introduces links to conflicting journeys.
|
||||||
|
# These require changes to statistics data.
|
||||||
|
sub {
|
||||||
|
my ($db) = @_;
|
||||||
|
$db->query(
|
||||||
|
qq{
|
||||||
|
truncate journey_stats;
|
||||||
|
update schema_version set version = 31;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
sub sync_stations {
|
sub sync_stations {
|
||||||
|
|
|
@ -1486,8 +1486,14 @@ sub compute_stats {
|
||||||
and $next_departure - $journey->{rt_arr_ts} < ( 60 * 60 ) )
|
and $next_departure - $journey->{rt_arr_ts} < ( 60 * 60 ) )
|
||||||
{
|
{
|
||||||
if ( $next_departure - $journey->{rt_arr_ts} < 0 ) {
|
if ( $next_departure - $journey->{rt_arr_ts} < 0 ) {
|
||||||
push( @inconsistencies,
|
push(
|
||||||
epoch_to_dt($next_departure)->strftime('%d.%m.%Y %H:%M') );
|
@inconsistencies,
|
||||||
|
[
|
||||||
|
epoch_to_dt($next_departure)
|
||||||
|
->strftime('%d.%m.%Y %H:%M'),
|
||||||
|
$journey->{id}
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$interchange_real
|
$interchange_real
|
||||||
|
|
|
@ -22,6 +22,10 @@ a.unmarked {
|
||||||
color: $off-black;
|
color: $off-black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.white-text a {
|
||||||
|
color: #eeeeff;
|
||||||
|
}
|
||||||
|
|
||||||
div.targetlist {
|
div.targetlist {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr max-content;
|
grid-template-columns: 1fr max-content;
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
vorherigen Zugfahrt und wurden bei der Wartezeitberechnung
|
vorherigen Zugfahrt und wurden bei der Wartezeitberechnung
|
||||||
ignoriert.
|
ignoriert.
|
||||||
<ul>
|
<ul>
|
||||||
% for my $date (@{$stats->{inconsistencies}}) {
|
% for my $field (@{$stats->{inconsistencies}}) {
|
||||||
<li><%= $date %></li>
|
<li><a href="/journey/<%= $field->[1] %>"><%= $field->[0] %></a></li>
|
||||||
% }
|
% }
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Add table
Reference in a new issue