Lines 41-46
use Koha::ItemTypes;
Link Here
|
41 |
use Koha::Libraries; |
41 |
use Koha::Libraries; |
42 |
|
42 |
|
43 |
use Koha::BiblioFrameworks; |
43 |
use Koha::BiblioFrameworks; |
|
|
44 |
use Koha::Plugins; |
45 |
use Koha::Plugins::Handler; |
44 |
|
46 |
|
45 |
use Date::Calc qw(Today); |
47 |
use Date::Calc qw(Today); |
46 |
use MARC::File::USMARC; |
48 |
use MARC::File::USMARC; |
Lines 832-837
if ( $op eq "addbiblio" ) {
Link Here
|
832 |
# getting html input |
834 |
# getting html input |
833 |
my @params = $input->multi_param(); |
835 |
my @params = $input->multi_param(); |
834 |
$record = TransformHtmlToMarc( $input, 1 ); |
836 |
$record = TransformHtmlToMarc( $input, 1 ); |
|
|
837 |
|
838 |
if ( $record ne '-1' && C4::Context->preference('UseKohaPlugins') && |
839 |
C4::Context->config('enable_plugins') ) { |
840 |
my @formaterrors; |
841 |
my @plugins = Koha::Plugins->new()->GetPlugins({ |
842 |
method => 'addbiblio_check_record' |
843 |
}); |
844 |
foreach my $plugin (@plugins) { |
845 |
push(@formaterrors, @{$plugin->addbiblio_check_record($record)}); |
846 |
} |
847 |
if (scalar(@formaterrors) > 0) { |
848 |
$template->param( |
849 |
marc_format_errors => \@formaterrors, |
850 |
title => $record->title, |
851 |
popup => $mode, |
852 |
frameworkcode => $frameworkcode, |
853 |
itemtype => $frameworkcode, |
854 |
borrowernumber => $loggedinuser, |
855 |
biblionumber => $biblionumber, |
856 |
tab => scalar $input->param('tab') |
857 |
); |
858 |
$template->{'VARS'}->{'searchid'} = $searchid; |
859 |
build_tabs ($template, $record, $dbh,$encoding,$input); |
860 |
output_html_with_http_headers $input, $cookie, $template->output; |
861 |
exit; |
862 |
} |
863 |
} |
864 |
|
835 |
# check for a duplicate |
865 |
# check for a duplicate |
836 |
my ( $duplicatebiblionumber, $duplicatetitle ); |
866 |
my ( $duplicatebiblionumber, $duplicatetitle ); |
837 |
if ( !$is_a_modif ) { |
867 |
if ( !$is_a_modif ) { |