|
Lines 416-425
elsif ( $step && $step == 3 ) {
Link Here
|
| 416 |
or die "Cannot open log file $logfilepath_errors: $!"; |
416 |
or die "Cannot open log file $logfilepath_errors: $!"; |
| 417 |
@report = <$fh>; |
417 |
@report = <$fh>; |
| 418 |
close $fh; |
418 |
close $fh; |
|
|
419 |
my $update_errors; |
| 419 |
if (@report) { |
420 |
if (@report) { |
| 420 |
$template->param( update_errors => |
421 |
$template->param( update_errors => |
| 421 |
[ map { { line => $_ } } split( /\n/, join( '', @report ) ) ] |
422 |
[ map { { line => $_ } } split( /\n/, join( '', @report ) ) ] |
| 422 |
); |
423 |
); |
|
|
424 |
$update_errors = 1; |
| 423 |
$template->param( has_update_errors => 1 ); |
425 |
$template->param( has_update_errors => 1 ); |
| 424 |
warn |
426 |
warn |
| 425 |
"The following errors were returned while attempting to run the updatedatabase.pl script:\n"; |
427 |
"The following errors were returned while attempting to run the updatedatabase.pl script:\n"; |
|
Lines 429-449
elsif ( $step && $step == 3 ) {
Link Here
|
| 429 |
eval { `rm $logfilepath_errors` }; |
431 |
eval { `rm $logfilepath_errors` }; |
| 430 |
} |
432 |
} |
| 431 |
|
433 |
|
| 432 |
my $db_entries = get_db_entries(); |
434 |
unless ( $update_errors ) { |
| 433 |
my $report = update( $db_entries ); |
435 |
my $db_entries = get_db_entries(); |
| 434 |
my $atomic_update_files = get_atomic_updates; |
436 |
my $report = update( $db_entries ); |
| 435 |
my $atomic_update_report = run_atomic_updates( $atomic_update_files ); |
437 |
my $atomic_update_files = get_atomic_updates; |
| 436 |
|
438 |
my $atomic_update_report = run_atomic_updates( $atomic_update_files ); |
| 437 |
$template->param( |
439 |
|
| 438 |
success => $report->{success}, |
440 |
$template->param( |
| 439 |
error => $report->{error}, |
441 |
success => $report->{success}, |
| 440 |
atomic_updates => { |
442 |
error => $report->{error}, |
| 441 |
success => $atomic_update_report->{success}, |
443 |
atomic_updates => { |
| 442 |
error => $atomic_update_report->{error} |
444 |
success => $atomic_update_report->{success}, |
| 443 |
} |
445 |
error => $atomic_update_report->{error} |
| 444 |
); |
446 |
} |
|
|
447 |
); |
| 448 |
} |
| 445 |
|
449 |
|
| 446 |
#warn "The following errors were returned while attempting to run the updatedatabase.pl script:\n"; #FIXME restore this |
|
|
| 447 |
$template->param( $op => 1 ); |
450 |
$template->param( $op => 1 ); |
| 448 |
} |
451 |
} |
| 449 |
else { |
452 |
else { |
| 450 |
- |
|
|