From 5b515f105793c5b926c98c2582f1f276f1322a70 Mon Sep 17 00:00:00 2001 From: Milan Date: Sun, 15 Nov 2020 20:09:48 +0100 Subject: [PATCH] events.pm: allow location "_" and "-" in location ids --- lib/calcms/events.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/calcms/events.pm b/lib/calcms/events.pm index f0676b8..a7fc8fa 100644 --- a/lib/calcms/events.pm +++ b/lib/calcms/events.pm @@ -216,7 +216,7 @@ sub modify_results ($$$$) { $running_event_id && $result->{event_id} && $running_event_id eq $result->{event_id} ; - + if (defined $result->{comment_count}){ $result->{one_comment} = 1 if ( $result->{comment_count} == 1 ); $result->{no_comment} = 1 if ( $result->{comment_count} == 0 ); @@ -849,7 +849,7 @@ sub get_query($$$) { my $location_cond = ''; if ( $params->{location} ne '' ) { my $location = ( split( /\,/, $params->{location} ) )[0]; - $location =~ s/[^a-zA-Z0-9]/%/g; + $location =~ s/[^a-zA-Z0-9\-\_]/%/g; $location =~ s/%{2,99}/%/g; if ( $location ne '' ) { $location_cond = ' location like ? ';