|
Lines 122-136
sub _get_biblio_for_export {
Link Here
|
| 122 |
my $export_items = $params->{export_items} // 1; |
122 |
my $export_items = $params->{export_items} // 1; |
| 123 |
my $only_export_items_for_branches = $params->{only_export_items_for_branches}; |
123 |
my $only_export_items_for_branches = $params->{only_export_items_for_branches}; |
| 124 |
my $embed_see_from_headings = $params->{embed_see_from_headings}; |
124 |
my $embed_see_from_headings = $params->{embed_see_from_headings}; |
|
|
125 |
my $embed_see_also_from_headings = $params->{embed_see_also_from_headings}; |
| 125 |
|
126 |
|
| 126 |
my $biblio = Koha::Biblios->find($biblionumber); |
127 |
my $biblio = Koha::Biblios->find($biblionumber); |
| 127 |
my $record = eval { $biblio->metadata->record }; |
128 |
my $record = eval { $biblio->metadata->record }; |
| 128 |
|
129 |
|
| 129 |
return if $@ or not defined $record; |
130 |
return if $@ or not defined $record; |
| 130 |
|
131 |
|
| 131 |
if ($embed_see_from_headings) { |
132 |
if ( $embed_see_from_headings || $embed_see_also_from_headings ) { |
| 132 |
my $record_processor = Koha::RecordProcessor->new( { filters => 'EmbedSeeFromHeadings' } ); |
133 |
my @esfh_fields; |
| 133 |
$record_processor->process($record); |
134 |
push '4..', @esfh_fields if $embed_see_from_headings; |
|
|
135 |
push '5..', @esfh_fields if $embed_see_also_from_headings; |
| 136 |
my $esfh_record_processor = Koha::RecordProcessor->new( |
| 137 |
{ |
| 138 |
filters => 'EmbedSeeFromHeadings', |
| 139 |
options => { |
| 140 |
auth_fields => \@esfh_fields, |
| 141 |
} |
| 142 |
} |
| 143 |
); |
| 144 |
$esfh_record_processor->process($record); |
| 134 |
} |
145 |
} |
| 135 |
|
146 |
|
| 136 |
if ($export_items) { |
147 |
if ($export_items) { |