|
Lines 23-28
use diagnostics;
Link Here
|
| 23 |
use C4::InstallAuth qw( get_template_and_user ); |
23 |
use C4::InstallAuth qw( get_template_and_user ); |
| 24 |
use CGI qw ( -utf8 ); |
24 |
use CGI qw ( -utf8 ); |
| 25 |
use POSIX; |
25 |
use POSIX; |
|
|
26 |
use HTML::FromANSI::Tiny; |
| 26 |
|
27 |
|
| 27 |
use C4::Context; |
28 |
use C4::Context; |
| 28 |
use C4::Output qw( output_html_with_http_headers ); |
29 |
use C4::Output qw( output_html_with_http_headers ); |
|
Lines 413-418
elsif ( $step && $step == 3 ) {
Link Here
|
| 413 |
my $fh; |
414 |
my $fh; |
| 414 |
open( $fh, "<:encoding(utf-8)", $logfilepath ) |
415 |
open( $fh, "<:encoding(utf-8)", $logfilepath ) |
| 415 |
or die "Cannot open log file $logfilepath: $!"; |
416 |
or die "Cannot open log file $logfilepath: $!"; |
|
|
417 |
|
| 416 |
my @report = <$fh>; |
418 |
my @report = <$fh>; |
| 417 |
close $fh; |
419 |
close $fh; |
| 418 |
if (@report) { |
420 |
if (@report) { |
|
Lines 449-454
elsif ( $step && $step == 3 ) {
Link Here
|
| 449 |
my $atomic_update_files = get_atomic_updates; |
451 |
my $atomic_update_files = get_atomic_updates; |
| 450 |
my $atomic_update_report = run_atomic_updates( $atomic_update_files ); |
452 |
my $atomic_update_report = run_atomic_updates( $atomic_update_files ); |
| 451 |
|
453 |
|
|
|
454 |
my $h = HTML::FromANSI::Tiny->new( |
| 455 |
auto_reverse => 1, background => 'white', foreground => 'black', |
| 456 |
inline_style => 1, no_plain_tags => 1 |
| 457 |
); |
| 458 |
for my $success ( @{ $report->{success} } ) { |
| 459 |
@{ $success->{output} } = map { $h->html($_) } @{ $success->{output} }; |
| 460 |
} |
| 461 |
for my $error ( @{ $report->{error} } ) { |
| 462 |
@{ $error->{output} } = map { $h->html($_) } @{ $error->{output} }; |
| 463 |
} |
| 464 |
for my $success ( @{ $atomic_update_report->{success} } ) { |
| 465 |
@{ $success->{output} } = map { $h->html($_) } @{ $success->{output} }; |
| 466 |
} |
| 467 |
for my $error ( @{ $atomic_update_report->{error} } ) { |
| 468 |
@{ $error->{output} } = map { $h->html($_) } @{ $error->{output} }; |
| 469 |
} |
| 470 |
|
| 452 |
$template->param( |
471 |
$template->param( |
| 453 |
success => $report->{success}, |
472 |
success => $report->{success}, |
| 454 |
error => $report->{error}, |
473 |
error => $report->{error}, |