From f8e0d905ff98b951de3826420c0c133f52e237cc 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. Joubu: I have no idea if this is still needed. TO TEST Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize https://bugs.koha-community.org/show_bug.cgi?id=13618 Signed-off-by: Nick Clemens --- C4/Installer.pm | 16 ++++++++-------- .../prog/en/modules/installer/step3.tt | 9 ++++++--- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/C4/Installer.pm b/C4/Installer.pm index 1a5c037a42..34f5ec2265 100644 --- a/C4/Installer.pm +++ b/C4/Installer.pm @@ -152,15 +152,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, }; @@ -229,15 +229,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 402bebd584..60fa02b47e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -105,7 +105,9 @@ [% ELSE %] [% END %] - [% framework.fwkdescription | html %] + [% FOREACH description IN framework.fwkdescription %] + [% description | html %]
+ [% END %] ([% framework.fwkname | html %]) @@ -140,8 +142,9 @@ [% ELSE %] [% END %] - [% framework.fwkdescription | html %] - ([% framework.fwkname | html %]) + [% FOREACH description IN framework.fwkdescription %] + [% description | html %]
+ [% END %] [% END # / FOREACH framework %] -- 2.39.5