http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11469
Bug ID: 11469
Summary: Publication date range assumes that years must always
be 4 digits
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Searching
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
This came up in a project where Koha is used for old manuscripts. The
publication date range search will not work if a user enters years < 1000:
opac-search.pl:
418 # append year limits if they exist
419 if ($params->{'limit-yr'}) {
420 if ($params->{'limit-yr'} =~ /\d{4}-\d{4}/) {
421 my ($yr1,$yr2) = split(/-/, $params->{'limit-yr'});
422 push @limits, "yr,st-numeric,ge=$yr1 and yr,st-numeric,le=$yr2";
423 }
424 elsif ($params->{'limit-yr'} =~ /\d{4}/) {
425 push @limits, "yr,st-numeric=$params->{'limit-yr'}";
426 }
427 else {
428 #FIXME: Should return a error to the user, incorect date format
specified
429 }
430 }
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/