Bugzilla – Attachment 57622 Details for
Bug 17484
Searching with date range limit (lower and upper) does not work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug_17484 Search with date range limit (lower and upper) does not work
Bug17484-Search-with-date-range-limit-lower-and-up.patch (text/plain), 1.96 KB, created by
Jonathan Druart
on 2016-11-18 09:26:45 UTC
(
hide
)
Description:
Bug_17484 Search with date range limit (lower and upper) does not work
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-11-18 09:26:45 UTC
Size:
1.96 KB
patch
obsolete
>From 515d65ee3af481a2ca2835ced8106428ebd07a26 Mon Sep 17 00:00:00 2001 >From: Koha Team Lyon 3 <koha@univ-lyon3.fr> >Date: Tue, 25 Oct 2016 13:37:47 +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: 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> >--- > catalogue/search.pl | 7 +------ > opac/opac-search.pl | 6 +----- > 2 files changed, 2 insertions(+), 11 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 5855bf1..e4e5e66 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -416,12 +416,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'}; > } >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.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17484
:
56726
|
56742
|
56842
|
57606
| 57622