From 25f6ba24478040e651dca8e001d5a07b1c0bd4ef Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Thu, 13 Sep 2012 11:33:44 -0400 Subject: [PATCH] Bug 8209 follow-up: another correction for BuildSummary API Signed-off-by: Jonathan Druart Signed-off-by: Paul Poulain --- Koha/SuggestionEngine/Plugin/AuthorityFile.pm | 2 +- t/SuggestionEngine_AuthorityFile.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/SuggestionEngine/Plugin/AuthorityFile.pm b/Koha/SuggestionEngine/Plugin/AuthorityFile.pm index 54a724827a..eb4a1c1153 100644 --- a/Koha/SuggestionEngine/Plugin/AuthorityFile.pm +++ b/Koha/SuggestionEngine/Plugin/AuthorityFile.pm @@ -80,7 +80,7 @@ sub get_suggestions { { 'search' => "an=$auth->{'authid'}", relevance => $count--, - label => $auth->{summary}->{authorized}->[0] + label => $auth->{summary}->{authorized}->[0]->{heading} }; } return \@results; diff --git a/t/SuggestionEngine_AuthorityFile.t b/t/SuggestionEngine_AuthorityFile.t index b9ab35b620..df8ab02a66 100755 --- a/t/SuggestionEngine_AuthorityFile.t +++ b/t/SuggestionEngine_AuthorityFile.t @@ -22,7 +22,7 @@ $module->mock('SearchAuthorities', sub { 'reported_tag' => undef, 'even' => 0, 'summary' => { - 'authorized' => [ 'Cooking' ], + 'authorized' => [ { 'heading' => 'Cooking' } ], 'otherscript' => [], 'seefrom' => [ 'Cookery' ], 'notes' => [ 'Your quintessential poor heading selection' ], -- 2.39.5