From fe1e13085e0c5ee6f104976d5c7ec1dd5194c132 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Wed, 4 Mar 2015 17:38:18 +1300 Subject: [PATCH] Bug 12478: basic auth search and display is working Signed-off-by: Nick Clemens Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall --- Koha/SearchEngine/Elasticsearch/Search.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm index 33644a475e..d48bdcdfb1 100644 --- a/Koha/SearchEngine/Elasticsearch/Search.pm +++ b/Koha/SearchEngine/Elasticsearch/Search.pm @@ -173,7 +173,7 @@ sub search_auth_compat { # the original code also makes an assumption that some provided # authtypecode may sometimes be used instead of the one stored # with the record. It's not documented why this is the case, so - # it's not reproduced here. + # it's not reproduced here yet. my $authtype = $rs->single; my $auth_tag_to_report = $authtype->auth_tag_to_report; my $marc = $self->json2marc($marc_json); @@ -186,17 +186,17 @@ sub search_auth_compat { } # Turn the resultset into a hash my %authtype_cols; - foreach my $col (@{ $authtype->result_source->columns }) { + foreach my $col ($authtype->result_source->columns) { $authtype_cols{$col} = $authtype->get_column($col); } - $result{authtype} = $authtype_cols; + $result{authtype} = $authtype->authtypetext; $result{reported_tag} = $reported_tag; # Reimplementing BuildSummary is out of scope because it'll be hard $result{summary} = C4::AuthoritiesMarc::BuildSummary( $marc, $result{authid}, $authtypecode ); - push @records, $marc; + push @records, \%result; } ); return ( \@records, $res->total ); -- 2.39.5