|
Lines 34-39
use C4::Koha;
Link Here
|
| 34 |
use C4::ClassSource; |
34 |
use C4::ClassSource; |
| 35 |
use C4::ImportBatch; |
35 |
use C4::ImportBatch; |
| 36 |
use C4::Charset; |
36 |
use C4::Charset; |
|
|
37 |
use C4::MarcModificationTemplates; |
| 37 |
use Koha::BiblioFrameworks; |
38 |
use Koha::BiblioFrameworks; |
| 38 |
use Koha::DateUtils; |
39 |
use Koha::DateUtils; |
| 39 |
|
40 |
|
|
Lines 45-50
use Date::Calc qw(Today);
Link Here
|
| 45 |
use MARC::File::USMARC; |
46 |
use MARC::File::USMARC; |
| 46 |
use MARC::File::XML; |
47 |
use MARC::File::XML; |
| 47 |
use URI::Escape; |
48 |
use URI::Escape; |
|
|
49 |
use List::MoreUtils qw(firstval); |
| 48 |
|
50 |
|
| 49 |
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) { |
51 |
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) { |
| 50 |
MARC::File::XML->default_record_format('UNIMARC'); |
52 |
MARC::File::XML->default_record_format('UNIMARC'); |
|
Lines 835-841
if ( $op eq "addbiblio" ) {
Link Here
|
| 835 |
my $oldbibitemnum; |
837 |
my $oldbibitemnum; |
| 836 |
if (C4::Context->preference("BiblioAddsAuthorities")){ |
838 |
if (C4::Context->preference("BiblioAddsAuthorities")){ |
| 837 |
BiblioAutoLink( $record, $frameworkcode ); |
839 |
BiblioAutoLink( $record, $frameworkcode ); |
| 838 |
} |
840 |
} |
|
|
841 |
my $marc_modification_template_name = C4::Context->preference("EditBiblioMarcModificationTemplate"); |
| 842 |
if ($marc_modification_template_name) { |
| 843 |
my $template = firstval { $_->{'name'} eq $marc_modification_template_name } GetModificationTemplates(); |
| 844 |
if ($template) { |
| 845 |
ModifyRecordWithTemplate($template->{'template_id'}, $record); |
| 846 |
} |
| 847 |
else { |
| 848 |
warn "No MARC modification template exists with name \"$marc_modification_template_name\""; |
| 849 |
} |
| 850 |
} |
| 839 |
if ( $is_a_modif ) { |
851 |
if ( $is_a_modif ) { |
| 840 |
ModBiblio( $record, $biblionumber, $frameworkcode ); |
852 |
ModBiblio( $record, $biblionumber, $frameworkcode ); |
| 841 |
} |
853 |
} |