From a591aa3c1369f31606e32fc08d143288038de00e 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 --- 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 54a7248..eb4a1c1 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 b9ab35b..df8ab02 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' ], -- 1.7.10.4