From 8d23c4fc04767515c95e1b24c6a5c5a04cc7631b Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 1 Feb 2016 14:25:56 -0500 Subject: [PATCH] Bug 15717: Installer: Step 3 has
showing The step to install optional/mandatory things is broken with many
's instead of line breaks. TEST PLAN --------- 1) Back up database 2) Drop database 3) Create empty database 4) Run web installer -- Notice that step 3 has ugly
's at the last part of step 3. 5) Apply patch 6) Repeat steps 2-4 -- Notice the
's are now nice line breaks. NOTE: No promises of perfect positioning! 7) Run koha qa test tools. Signed-off-by: Nick Clemens --- C4/Installer.pm | 16 ++++++++-------- .../intranet-tmpl/prog/en/modules/installer/step3.tt | 8 ++++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/C4/Installer.pm b/C4/Installer.pm index 5fe2e16..0db8cca 100644 --- a/C4/Installer.pm +++ b/C4/Installer.pm @@ -137,15 +137,15 @@ sub marc_framework_sql_list { map { my $name = substr( $_, 0, -4 ); open my $fh, "<:encoding(UTF-8)", "$dir/$requirelevel/$name.txt"; - my $lines = <$fh>; - $lines =~ s/\n|\r/
/g; - $lines = Encode::encode('UTF-8', $lines) unless ( Encode::is_utf8($lines) ); + my $line = <$fh>; + $line = Encode::encode('UTF-8', $line) unless ( Encode::is_utf8($line) ); + my @lines = split /\n/, $line; my $mandatory = ($requirelevel =~ /(mandatory|requi|oblig|necess)/i); push @frameworklist, { 'fwkname' => $name, 'fwkfile' => "$dir/$requirelevel/$_", - 'fwkdescription' => $lines, + 'fwkdescription' => \@lines, 'checked' => ( ( $frameworksloaded{$_} || $mandatory ) ? 1 : 0 ), 'mandatory' => $mandatory, }; @@ -214,15 +214,15 @@ sub sample_data_sql_list { map { my $name = substr( $_, 0, -4 ); open my $fh , "<:encoding(UTF-8)", "$dir/$requirelevel/$name.txt"; - my $lines = <$fh>; - $lines =~ s/\n|\r/
/g; - $lines = Encode::encode('UTF-8', $lines) unless ( Encode::is_utf8($lines) ); + my $line = <$fh>; + $line = Encode::encode('UTF-8', $line) unless ( Encode::is_utf8($line) ); + my @lines = split /\n/, $line; my $mandatory = ($requirelevel =~ /(mandatory|requi|oblig|necess)/i); push @frameworklist, { 'fwkname' => $name, 'fwkfile' => "$dir/$requirelevel/$_", - 'fwkdescription' => $lines, + 'fwkdescription' => \@lines, 'checked' => ( ( $frameworksloaded{$_} || $mandatory ) ? 1 : 0 ), 'mandatory' => $mandatory, }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt index 6bcd69e..2a594a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -117,7 +117,9 @@ @@ -146,7 +148,9 @@ -- 2.1.4