From f22bb0f3f4a66436b9999ec06e9a4ac8833acd53 Mon Sep 17 00:00:00 2001 From: Mark Hofstetter Date: Wed, 3 May 2023 16:21:05 +0200 Subject: [PATCH] Bug 28166: Optionally add MARC fields to authority search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Laura Escamilla Signed-off-by: Clemens Tubach --- C4/Breeding.pm | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index aaa675b708..849efc39c6 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -342,36 +342,8 @@ sub _do_xslt_proc { } } -sub _add_rowdata { - my ($row, $record)=@_; - my %fetch= ( - title => 'biblio.title', - author => 'biblio.author', - isbn =>'biblioitems.isbn', - lccn =>'biblioitems.lccn', #LC control number (not call number) - edition =>'biblioitems.editionstatement' - ); - $fetch{date} = C4::Context->preference('marcflavour') eq "MARC21" ? 'biblio.copyrightdate' : 'biblioitems.publicationyear'; - - #foreach my $k (keys %fetch) { - # $row->{$k} = C4::Biblio::TransformMarcToKohaOneField( $fetch{$k}, $record ); - #} - $row->{date}//= $row->{date2}; - $row->{isbn}=_isbn_replace($row->{isbn}); - - $row = _add_custom_field_rowdata( - $row, - $record, - C4::Context->preference('AdditionalFieldsInZ3950ResultSearch')) - if C4::Context->preference('AdditionalFieldsInZ3950ResultSearch'); - return $row; -} - sub _add_custom_field_rowdata { - # my ( $row, $record ) = @_; - # my $pref_newtags = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch'); - # hks3 my ( $row, $record, $pref_newtags ) = @_; my $pref_flavour = C4::Context->preference('MarcFlavour'); -- 2.20.1