From 5619df9f8450db1ada476440fc3be2a973ed8809 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Mon, 20 Aug 2012 12:22:44 -0400 Subject: [PATCH] Enable 1-hit redirect for item barcode searches Signed-off-by: Thomas Berezansky Signed-off-by: Jason Stephenson Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm index 04797fa893..dea01459d5 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -327,7 +327,7 @@ sub load_rresults { return $self->marc_expert_search(%args) if scalar($cgi->param("tag")); $self->timelog("Calling item barcode search"); return $self->item_barcode_shortcut if ( - $cgi->param("qtype") and ($cgi->param("qtype") eq "item_barcode") + $cgi->param("qtype") and ($cgi->param("qtype") eq "item_barcode") and not $internal ); $self->timelog("Calling call number browse"); return $self->call_number_browse_standalone if ( @@ -578,6 +578,9 @@ sub item_barcode_shortcut { ); $self->timelog("Returned from calling get_records_and_facets() for item_barcode"); + my $stat = $self->check_1hit_redirect($rec_ids); + return $stat if $stat; + $self->ctx->{records} = [@data]; $self->ctx->{search_facets} = {}; $self->ctx->{hit_count} = scalar @data; -- 2.43.2