From b3f743dee941aef402fa30b67ae23b32f478b1e4 Mon Sep 17 00:00:00 2001 From: Milan Date: Thu, 25 Jan 2018 22:11:15 +0100 Subject: [PATCH] fix date detection in aggregate --- website/agenda/aggregate.cgi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/agenda/aggregate.cgi b/website/agenda/aggregate.cgi index fe5b374..8b609bd 100755 --- a/website/agenda/aggregate.cgi +++ b/website/agenda/aggregate.cgi @@ -79,8 +79,11 @@ if ( $0 =~ /aggregate.*?\.cgi$/ ) { my $list = aggregator::get_list( $config, $request ); my $menu = { content => '' }; - $list->{day} = $params->{date} if ( ( !defined $list->{day} ) || ( $list->{day} eq '' ) ); - $list->{day} = 'today' if ( $list->{day} eq '' && $params->{date} eq '' ); + + $list->{day} = '' unless defined $list->{day}; + $list->{day} = $params->{date} if (defined $params->{date}) && ($params->{date} ne ''); + $list->{day} = $params->{from_date} if (defined $params->{from_date}) && ($params->{from_date} ne ''); + $list->{day} = 'today' if $list->{day} eq ''; $menu = aggregator::get_menu( $config, $request, $list->{day}, $list->{results} );