Lines 81-87
if ($merge) {
Link Here
|
81 |
# If some items could not be moved : |
81 |
# If some items could not be moved : |
82 |
if (scalar(@notmoveditems) > 0) { |
82 |
if (scalar(@notmoveditems) > 0) { |
83 |
my $itemlist = join(' ',@notmoveditems); |
83 |
my $itemlist = join(' ',@notmoveditems); |
84 |
push @errors, "The following items could not be moved from the old record to the new one: $itemlist"; |
84 |
push @errors, { code => "CANNOT_MOVE", value => $itemlist }; |
85 |
} |
85 |
} |
86 |
|
86 |
|
87 |
# Moving subscriptions from the other record to the reference record |
87 |
# Moving subscriptions from the other record to the reference record |
Lines 123-129
if ($merge) {
Link Here
|
123 |
my $biblionumber = $input->param('biblionumber'); |
123 |
my $biblionumber = $input->param('biblionumber'); |
124 |
|
124 |
|
125 |
if (scalar(@biblionumber) != 2) { |
125 |
if (scalar(@biblionumber) != 2) { |
126 |
push @errors, "An unexpected number of records was provided for merging. Currently only two records at a time can be merged."; |
126 |
push @errors, { code => "WRONG_COUNT", value => scalar(@biblionumber) }; |
127 |
} |
127 |
} |
128 |
else { |
128 |
else { |
129 |
my $data1 = GetBiblioData($biblionumber[0]); |
129 |
my $data1 = GetBiblioData($biblionumber[0]); |
Lines 206-213
if ($merge) {
Link Here
|
206 |
|
206 |
|
207 |
if (@errors) { |
207 |
if (@errors) { |
208 |
# Errors |
208 |
# Errors |
209 |
my @errors_loop = map{{error => $_}}@errors; |
209 |
$template->param( errors => \@errors ); |
210 |
$template->param( errors => \@errors_loop ); |
|
|
211 |
} |
210 |
} |
212 |
|
211 |
|
213 |
output_html_with_http_headers $input, $cookie, $template->output; |
212 |
output_html_with_http_headers $input, $cookie, $template->output; |