From 727d0647b41d71b09d9a8b08dd906c723eb3fb50 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 9 Apr 2012 15:26:40 -0400 Subject: [PATCH] kpac : ensure the single-hit redirect goes to kpac ... instead of to the tpac record detail page. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm index 5c80f92ea3..a0637cf84b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGKPacLoader.pm @@ -27,7 +27,7 @@ sub load { return $self->load_simple("home") if $path =~ m|kpac/home|; return $self->load_simple("category") if $path =~ m|kpac/category|; - return $self->load_rresults if $path =~ m|kpac/results|; + return $self->load_kpac_rresults if $path =~ m|kpac/results|; return $self->load_record(no_search => 1) if $path =~ m|kpac/record|; # ---------------------------------------------------------------- @@ -48,6 +48,21 @@ sub load { return Apache2::Const::OK; } +sub load_kpac_rresults { + my $self = shift; + + # The redirect-to-record-details-on-single-hit logic + # leverages the opac_root to determine the record detail + # page. Replace it temporarily for our purposes. + my $tpac_root = $self->ctx->{opac_root}; + $self->ctx->{opac_root} = $self->ctx->{kpac_root}; + + my $stat = $self->load_rresults; + $self->ctx->{opac_root} = $tpac_root; + + return $stat; +} + sub load_getit { my $self = shift; my $ctx = $self->ctx; -- 2.11.0