[Koha-bugs] [Bug 11469] New: Publication date range assumes that years must always be 4 digits
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jan 2 16:42:42 CET 2014
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: gmcharlt at gmail.com
Reporter: katrin.fischer at bsz-bw.de
QA Contact: testopia at bugs.koha-community.org
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.
More information about the Koha-bugs
mailing list