When activated, jump-to-record-details-on-1-hit should only come into
play on the first page of results. In other words, if page 2 of a
search has 1 item, do not jump to the record details page for that item.
Instead, show page 2 of the search results.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
}
);
- my $stat = $self->check_1hit_redirect($rec_ids);
- return $stat if $stat;
+ if ($page == 0) {
+ my $stat = $self->check_1hit_redirect($rec_ids);
+ return $stat if $stat;
+ }
# shove recs into context in search results order
for my $rec_id (@$rec_ids) {
return Apache2::Const::OK if @{$self->ctx->{ids}} == 0 or $args{internal};
- my $stat = $self->check_1hit_redirect($self->ctx->{ids});
- return $stat if $stat;
+ if ($page == 0) {
+ my $stat = $self->check_1hit_redirect($self->ctx->{ids});
+ return $stat if $stat;
+ }
my ($facets, @data) = $self->get_records_and_facets(
$self->ctx->{ids}, undef, {flesh => "{holdings_xml,mra}"}