From 9a8ea2e46da6c788a633383b81cce70c9323f750 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 Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- .../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 9a3932ef07..de1afef40e 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 dcbc8d7a79..e63a44a809 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.39.5