summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-12-29 14:14:12 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-12-29 14:14:12 +0100
commitccc93413a28d03fd3d2ccf2d86831ad00c77cfe2 (patch)
treeb291c9a5034a7a09d87d97d536900f1811084d99 /lib/Travelynx/Controller
parent09463d7d1156d7a4e17c018fbe8aac3bddc207e7 (diff)
review: link to list of all single-trip checkins1.29.1
Diffstat (limited to 'lib/Travelynx/Controller')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 7a00cd0..01a9059 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -1513,7 +1513,8 @@ sub year_in_review {
sub yearly_history {
my ($self) = @_;
- my $year = $self->stash('year');
+ my $year = $self->stash('year');
+ my $filter = $self->param('filter');
my @journeys;
# DateTime is very slow when looking far into the future due to DST changes
@@ -1540,6 +1541,10 @@ sub yearly_history {
with_datetime => 1
);
+ if ( $filter and $filter eq 'single' ) {
+ @journeys = $self->journeys->grep_single(@journeys);
+ }
+
if ( not @journeys ) {
$self->render( 'not_found',
message => 'Keine Zugfahrten im angefragten Jahr gefunden.' );