From dc8fb1f9a481131c8e1b55fc34d075e46640c29e Mon Sep 17 00:00:00 2001 From: blake Date: Thu, 9 Feb 2017 21:14:24 -0600 Subject: [PATCH] LP1629108 Finalizing Search.pm removing if block For ease of diffing, I left the old if block in place because removing it would cause all of the lines to show changes when in fact it was just spacing. This commit simply removes the if block and the spacing is the only change. Signed-off-by: blake Signed-off-by: Kathy Lussier --- .../lib/OpenILS/WWW/EGCatLoader/Search.pm | 63 ++++++++----------- 1 file changed, 26 insertions(+), 37 deletions(-) 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 2d7a8d85bb..ad057d351b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -412,52 +412,41 @@ sub load_rresults { # the query string, not special args. my $args = {'limit' => $limit, 'offset' => $offset}; - if (0) { #($metarecord) { - my $bre_ids = $self->recs_from_metarecord( - $metarecord, $ctx->{search_ou}, $depth); - - # force the metarecord result blob to match the format of regular search results - $results->{ids} = [map { [$_] } @$bre_ids]; - $results->{count} = scalar(@{$results->{ids}}); + return Apache2::Const::OK unless $query; - } else { - - return Apache2::Const::OK unless $query; - - if ($tag_circs) { - $args->{tag_circulated_records} = 1; - $args->{authtoken} = $self->editor->authtoken; - } - $args->{from_metarecord} = $metarecord if $metarecord; + if ($tag_circs) { + $args->{tag_circulated_records} = 1; + $args->{authtoken} = $self->editor->authtoken; + } + $args->{from_metarecord} = $metarecord if $metarecord; - # Stuff these into the TT context so that templates can use them in redrawing forms - $ctx->{user_query} = $user_query; - $ctx->{processed_search_query} = $query; + # Stuff these into the TT context so that templates can use them in redrawing forms + $ctx->{user_query} = $user_query; + $ctx->{processed_search_query} = $query; - $query = "$_ $query" for @facets; + $query = "$_ $query" for @facets; - my $ltag = $is_meta ? '[mmr search]' : '[bre search]'; - $logger->activity("EGWeb: $ltag $query"); + my $ltag = $is_meta ? '[mmr search]' : '[bre search]'; + $logger->activity("EGWeb: $ltag $query"); - try { + try { - my $method = 'open-ils.search.biblio.multiclass.query'; - $method .= '.staff' if $ctx->{is_staff}; - $method =~ s/biblio/metabib/ if $is_meta; + my $method = 'open-ils.search.biblio.multiclass.query'; + $method .= '.staff' if $ctx->{is_staff}; + $method =~ s/biblio/metabib/ if $is_meta; - my $ses = OpenSRF::AppSession->create('open-ils.search'); + my $ses = OpenSRF::AppSession->create('open-ils.search'); - $self->timelog("Firing off the multiclass query"); - my $req = $ses->request($method, $args, $query, 1); - $results = $req->gather(1); - $self->timelog("Returned from the multiclass query"); + $self->timelog("Firing off the multiclass query"); + my $req = $ses->request($method, $args, $query, 1); + $results = $req->gather(1); + $self->timelog("Returned from the multiclass query"); - } catch Error with { - my $err = shift; - $logger->error("multiclass search error: $err"); - $results = {count => 0, ids => []}; - }; - } + } catch Error with { + my $err = shift; + $logger->error("multiclass search error: $err"); + $results = {count => 0, ids => []}; + }; my $rec_ids = [map { $_->[0] } @{$results->{ids}}]; -- 2.43.2