From 29952cdf91994ce7cc6eb44d10fcfe13cee6bbb8 Mon Sep 17 00:00:00 2001 From: kohamaster Date: Fri, 21 Oct 2016 17:49:56 +0200 Subject: [PATCH] Bug_17484 Search with date range limit (lower and upper) does not work If the period is entered without spaces wrapping the hyphen, You can't get any result Signed-off-by: Colin Campbell --- opac/opac-search.pl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index ccbc025..3c07b88 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -506,11 +506,7 @@ $template->param(available => $available); # append year limits if they exist if ($params->{'limit-yr'}) { - if ($params->{'limit-yr'} =~ /\d{4}-\d{4}/) { - my ($yr1,$yr2) = split(/-/, $params->{'limit-yr'}); - push @limits, "yr,st-numeric,ge=$yr1 and yr,st-numeric,le=$yr2"; - } - elsif ($params->{'limit-yr'} =~ /\d{4}/) { + if ($params->{'limit-yr'} =~ /\d{4}/) { push @limits, "yr,st-numeric=$params->{'limit-yr'}"; } else { -- 2.7.4