View | Details | Raw Unified | Return to bug 17484
Collapse All | Expand All

(-)a/catalogue/search.pl (-6 / +1 lines)
Lines 416-427 $template->param(available => $available); Link Here
416
my $limit_yr;
416
my $limit_yr;
417
my $limit_yr_value;
417
my $limit_yr_value;
418
if ($params->{'limit-yr'}) {
418
if ($params->{'limit-yr'}) {
419
    if ($params->{'limit-yr'} =~ /\d{4}-\d{4}/) {
419
    if ($params->{'limit-yr'} =~ /\d{4}/) {
420
        my ($yr1,$yr2) = split(/-/, $params->{'limit-yr'});
421
        $limit_yr = "yr,st-numeric,ge=$yr1 and yr,st-numeric,le=$yr2";
422
        $limit_yr_value = "$yr1-$yr2";
423
    }
424
    elsif ($params->{'limit-yr'} =~ /\d{4}/) {
425
        $limit_yr = "yr,st-numeric=$params->{'limit-yr'}";
420
        $limit_yr = "yr,st-numeric=$params->{'limit-yr'}";
426
        $limit_yr_value = $params->{'limit-yr'};
421
        $limit_yr_value = $params->{'limit-yr'};
427
    }
422
    }
(-)a/opac/opac-search.pl (-6 / +1 lines)
Lines 506-516 $template->param(available => $available); Link Here
506
506
507
# append year limits if they exist
507
# append year limits if they exist
508
if ($params->{'limit-yr'}) {
508
if ($params->{'limit-yr'}) {
509
    if ($params->{'limit-yr'} =~ /\d{4}-\d{4}/) {
509
    if ($params->{'limit-yr'} =~ /\d{4}/) {
510
        my ($yr1,$yr2) = split(/-/, $params->{'limit-yr'});
511
        push @limits, "yr,st-numeric,ge=$yr1 and yr,st-numeric,le=$yr2";
512
    }
513
    elsif ($params->{'limit-yr'} =~ /\d{4}/) {
514
        push @limits, "yr,st-numeric=$params->{'limit-yr'}";
510
        push @limits, "yr,st-numeric=$params->{'limit-yr'}";
515
    }
511
    }
516
    else {
512
    else {
517
- 

Return to bug 17484