From 708bd11735fcfe1047b5f2079dbaf60d531f4ec3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 Oct 2021 10:06:15 +0200 Subject: [PATCH] Bug 29113: Fix random assignation --- .../prog/en/modules/tools/additional-contents.tt | 6 +++--- tools/additional-contents.pl | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index e3c1ca94938..35cf4fbbfde 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -202,7 +202,7 @@ [% UNLESS languages.size %]
  • - Required + Required
  • [% END %]
  • @@ -250,11 +250,11 @@
    1. - +
    2. - +
    diff --git a/tools/additional-contents.pl b/tools/additional-contents.pl index dcbc8d7a797..e63a44a809a 100755 --- a/tools/additional-contents.pl +++ b/tools/additional-contents.pl @@ -83,8 +83,6 @@ elsif ( $op eq 'add_validate' ) { my $code = $cgi->param('code'); my $branchcode = $cgi->param('branchcode') || undef; - my @title = $cgi->multi_param('title'); - my @content = $cgi->multi_param('content'); my @lang = $cgi->multi_param('lang'); my $expirationdate; @@ -108,8 +106,8 @@ elsif ( $op eq 'add_validate' ) { my $success = 1; for my $lang ( sort {$a ne 'default'} @lang ) { # Process 'default' first - my $title = shift @title; - my $content = shift @content; + my $title = $cgi->param( 'title_' . $lang ); + my $content = $cgi->param( 'content_' . $lang ); my $additional_content = Koha::AdditionalContents->find( { category => $category, -- 2.25.1