|
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 827-832
if ( $op eq "addbiblio" ) {
Link Here
|
| 827 |
# getting html input |
829 |
# getting html input |
| 828 |
my @params = $input->multi_param(); |
830 |
my @params = $input->multi_param(); |
| 829 |
$record = TransformHtmlToMarc( $input, 1 ); |
831 |
$record = TransformHtmlToMarc( $input, 1 ); |
|
|
832 |
|
| 833 |
if ( $record ne '-1' && C4::Context->preference('UseKohaPlugins') && |
| 834 |
C4::Context->config('enable_plugins') ) { |
| 835 |
my @formaterrors; |
| 836 |
my @plugins = Koha::Plugins->new()->GetPlugins({ |
| 837 |
method => 'addbiblio_check_record' |
| 838 |
}); |
| 839 |
foreach my $plugin (@plugins) { |
| 840 |
push(@formaterrors, @{$plugin->addbiblio_check_record($record)}); |
| 841 |
} |
| 842 |
if (scalar(@formaterrors) > 0) { |
| 843 |
$template->param( |
| 844 |
marc_format_errors => \@formaterrors, |
| 845 |
title => $record->title, |
| 846 |
popup => $mode, |
| 847 |
frameworkcode => $frameworkcode, |
| 848 |
itemtype => $frameworkcode, |
| 849 |
borrowernumber => $loggedinuser, |
| 850 |
biblionumber => $biblionumber, |
| 851 |
tab => scalar $input->param('tab') |
| 852 |
); |
| 853 |
$template->{'VARS'}->{'searchid'} = $searchid; |
| 854 |
build_tabs ($template, $record, $dbh,$encoding,$input); |
| 855 |
output_html_with_http_headers $input, $cookie, $template->output; |
| 856 |
exit; |
| 857 |
} |
| 858 |
} |
| 859 |
|
| 830 |
# check for a duplicate |
860 |
# check for a duplicate |
| 831 |
my ( $duplicatebiblionumber, $duplicatetitle ); |
861 |
my ( $duplicatebiblionumber, $duplicatetitle ); |
| 832 |
if ( !$is_a_modif ) { |
862 |
if ( !$is_a_modif ) { |