Merge remote-tracking branch 'origin/new/bug_8209'
[koha.git] / Koha / SuggestionEngine / Plugin / AuthorityFile.pm
index 54a7248..fdc41c5 100644 (file)
@@ -35,8 +35,24 @@ use warnings;
 use Carp;
 
 use base qw(Koha::SuggestionEngine::Base);
-our $NAME    = 'AuthorityFile';
-our $VERSION = '1.0';
+
+=head2 NAME
+    my $name = $plugin->NAME;
+
+=cut
+
+sub NAME {
+    return 'AuthorityFile';
+}
+
+=head2 VERSION
+    my $version = $plugin->VERSION;
+
+=cut
+
+sub VERSION {
+    return '1.1';
+}
 
 =head2 get_suggestions
 
@@ -80,8 +96,10 @@ sub get_suggestions {
           {
             'search'  => "an=$auth->{'authid'}",
             relevance => $count--,
-            label     => $auth->{summary}->{authorized}->[0]
+            label     => $auth->{summary}->{authorized}->[0]->{heading}
           };
     }
     return \@results;
 }
+
+1;