@@ -, +, @@ --- installer/install.pl | 19 +++++++++++++++++++ .../prog/en/modules/installer/step3.tt | 8 ++++---- 2 files changed, 23 insertions(+), 4 deletions(-) --- a/installer/install.pl +++ a/installer/install.pl @@ -23,6 +23,7 @@ use diagnostics; use C4::InstallAuth qw( get_template_and_user ); use CGI qw ( -utf8 ); use POSIX; +use HTML::FromANSI::Tiny; use C4::Context; use C4::Output qw( output_html_with_http_headers ); @@ -413,6 +414,7 @@ elsif ( $step && $step == 3 ) { my $fh; open( $fh, "<:encoding(utf-8)", $logfilepath ) or die "Cannot open log file $logfilepath: $!"; + my @report = <$fh>; close $fh; if (@report) { @@ -449,6 +451,23 @@ elsif ( $step && $step == 3 ) { my $atomic_update_files = get_atomic_updates; my $atomic_update_report = run_atomic_updates( $atomic_update_files ); + my $h = HTML::FromANSI::Tiny->new( + auto_reverse => 1, background => 'white', foreground => 'black', + inline_style => 1, no_plain_tags => 1 + ); + for my $success ( @{ $report->{success} } ) { + @{ $success->{output} } = map { $h->html($_) } @{ $success->{output} }; + } + for my $error ( @{ $report->{error} } ) { + @{ $error->{output} } = map { $h->html($_) } @{ $error->{output} }; + } + for my $success ( @{ $atomic_update_report->{success} } ) { + @{ $success->{output} } = map { $h->html($_) } @{ $success->{output} }; + } + for my $error ( @{ $atomic_update_report->{error} } ) { + @{ $error->{output} } = map { $h->html($_) } @{ $error->{output} }; + } + $template->param( success => $report->{success}, error => $report->{error}, --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -367,7 +367,7 @@