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: Mirko Tietgen <mirko@abunchofthings.net>
I can't reproduce the error, search still works after applying the patch
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 660be0e019)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
parent
f080cf4546
commit
eaeca1cd4f
|
|
@ -438,12 +438,7 @@ $template->param(available => $available);
|
|||
my $limit_yr;
|
||||
my $limit_yr_value;
|
||||
if ($params->{'limit-yr'}) {
|
||||
if ($params->{'limit-yr'} =~ /\d{4}-\d{4}/) {
|
||||
my ($yr1,$yr2) = split(/-/, $params->{'limit-yr'});
|
||||
$limit_yr = "yr,st-numeric,ge=$yr1 and yr,st-numeric,le=$yr2";
|
||||
$limit_yr_value = "$yr1-$yr2";
|
||||
}
|
||||
elsif ($params->{'limit-yr'} =~ /\d{4}/) {
|
||||
if ($params->{'limit-yr'} =~ /\d{4}/) {
|
||||
$limit_yr = "yr,st-numeric=$params->{'limit-yr'}";
|
||||
$limit_yr_value = $params->{'limit-yr'};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -493,11 +493,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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue