use C4::Items;
use C4::Biblio;
use C4::Serials;
-use YAML;
my $input = new CGI;
my @biblionumber = $input->param('biblionumber');
#------------------------
if ($merge) {
- my @params = $input->param();
my $dbh = C4::Context->dbh;
my $sth;
# Creating a new record from the html code
- my $record = TransformHtmlToMarc( \@params , $input );
+ my $record = TransformHtmlToMarc( $input );
my $tobiblio = $input->param('biblio1');
my $frombiblio = $input->param('biblio2');
# Moving items from the other record to the reference record
my $itemnumbers = get_itemnumbers_of($frombiblio);
- use Data::Dumper;
foreach my $itloop ($itemnumbers->{$frombiblio}) {
foreach my $itemnumber (@$itloop) {
my $res = MoveItemFromBiblio($itemnumber, $frombiblio, $tobiblio);
my @errors_loop = map{{error => $_}}@errors;
# Parameters
- $template->param({
+ $template->param(
errors => \@errors_loop,
result => 1,
biblio1 => $input->param('biblio1')
- });
+ );
#-------------------------
# Ask the user to choose which record will be the kept
if (not $mergereference) {
- $template->param({
+ $template->param(
choosereference => 1,
biblio1 => $biblionumber[0],
biblio2 => $biblionumber[1],
title1 => $data1->{'title'},
title2 => $data2->{'title'}
- });
+ );
} else {
if (scalar(@biblionumber) != 2) {
my @errors_loop = map{{error => $_}}@errors;
# Parameters
- $template->param({
+ $template->param(
errors => \@errors_loop,
biblio1 => $mergereference,
biblio2 => $notreference,
record1 => @record1,
record2 => @record2,
framework => $framework
- });
+ );
}
}
output_html_with_http_headers $input, $cookie, $template->output;
exit;
+=head1 FUNCTIONS
+
+=cut
# ------------------------
# Functions
}
-=item CreateKey
+=head2 CreateKey
- Create a random value to set it into the input name
+Create a random value to set it into the input name
=cut