Bug 12409: Fix fields order on exporting to bibtex
[koha_fer] / C4 / AuthoritiesMarc.pm
index 1e843ec..95fe33a 100644 (file)
@@ -266,7 +266,7 @@ sub SearchAuthorities {
         
         ##Here we have to extract MARC record and $authid from ZEBRA AUTHORITIES
         my $rec=$oAResult->record($counter);
-        my $separator=C4::Context->preference('authoritysep');
+        my $separator=C4::Context->preference('AuthoritySeparator');
         my $authrecord = C4::Search::new_record_from_zebra(
             'authorityserver',
             $rec->raw()
@@ -896,6 +896,11 @@ sub BuildSummary {
         $summary{authtypecode} = $authref->{authtypecode};
         $summary{type} = $authref->{authtypetext};
         $summary_template = $authref->{summary};
+        # for MARC21, the authority type summary displays a label meant for
+        # display
+        if (C4::Context->preference('marcflavour') ne 'UNIMARC') {
+            $summary{summary} = $authref->{summary};
+        }
     }
     my $marc21subfields = 'abcdfghjklmnopqrstuvxyz68';
     my %marc21controlrefs = ( 'a' => 'earlier',