Lines 995-1000
The argument should be an arrayref, and it'll return an arrayref.
Link Here
|
995 |
sub _fix_limit_special_cases { |
995 |
sub _fix_limit_special_cases { |
996 |
my ( $self, $limits ) = @_; |
996 |
my ( $self, $limits ) = @_; |
997 |
|
997 |
|
|
|
998 |
# yr is usually an alias of a search field |
999 |
my $yrfield = ( exists $index_field_convert{'yr'} ) ? $index_field_convert{'yr'} : 'yr'; |
1000 |
|
998 |
my @new_lim; |
1001 |
my @new_lim; |
999 |
foreach my $l (@$limits) { |
1002 |
foreach my $l (@$limits) { |
1000 |
|
1003 |
|
Lines 1003-1015
sub _fix_limit_special_cases {
Link Here
|
1003 |
my ( $start, $end ) = |
1006 |
my ( $start, $end ) = |
1004 |
( $l =~ /^yr,st-numeric,ge=(.*) and yr,st-numeric,le=(.*)$/ ); |
1007 |
( $l =~ /^yr,st-numeric,ge=(.*) and yr,st-numeric,le=(.*)$/ ); |
1005 |
next unless defined($start) && defined($end); |
1008 |
next unless defined($start) && defined($end); |
1006 |
push @new_lim, "copydate:[$start TO $end]"; |
1009 |
push @new_lim, "$yrfield:[$start TO $end]"; |
1007 |
} |
1010 |
} |
1008 |
elsif ( $l =~ /^yr,st-numeric=/ ) { |
1011 |
elsif ( $l =~ /^yr,st-numeric=/ ) { |
1009 |
my ($date) = ( $l =~ /^yr,st-numeric=(.*)$/ ); |
1012 |
my ($date) = ( $l =~ /^yr,st-numeric=(.*)$/ ); |
1010 |
next unless defined($date); |
1013 |
next unless defined($date); |
1011 |
$date = $self->_modify_string_by_type(type => 'st-year', operand => $date); |
1014 |
$date = $self->_modify_string_by_type(type => 'st-year', operand => $date); |
1012 |
push @new_lim, "copydate:$date"; |
1015 |
push @new_lim, "$yrfield:$date"; |
1013 |
} |
1016 |
} |
1014 |
elsif ( $l =~ /^available$/ ) { |
1017 |
elsif ( $l =~ /^available$/ ) { |
1015 |
push @new_lim, 'onloan:false'; |
1018 |
push @new_lim, 'onloan:false'; |
1016 |
- |
|
|