From bf673f32eaecde7e262fc235d93f7c76b2c025fd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 14 Sep 2021 19:26:32 +0200 Subject: [PATCH] Bug 24387: Entries with parent are missing a code We executed the same 2 queries, we want to adjust the code for the parent and the language specific row. Signed-off-by: Nick Clemens --- installer/data/mysql/db_revs/210600016.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/db_revs/210600016.pl b/installer/data/mysql/db_revs/210600016.pl index 05b0544250..8d66de86cb 100755 --- a/installer/data/mysql/db_revs/210600016.pl +++ b/installer/data/mysql/db_revs/210600016.pl @@ -132,8 +132,8 @@ return { my $idnew = $parent_idnew || $c->{idnew}; my $code = ( grep {$_ eq $location} qw( staff_and_opac staff_only opac_only slip ) ) ? "${location}_$idnew" : "News_$idnew"; - $dbh->do(q|UPDATE additional_contents SET code=? WHERE idnew = ?|, undef, $code, $idnew) if $parent_idnew; - $dbh->do(q|UPDATE additional_contents SET code=? WHERE idnew = ?|, undef, $code, $idnew); + $dbh->do(q|UPDATE additional_contents SET code=? WHERE idnew = ?|, undef, $code, $parent_idnew) if $parent_idnew; + $dbh->do(q|UPDATE additional_contents SET code=? WHERE idnew = ?|, undef, $code, $c->{idnew}); } $dbh->do(q| -- 2.20.1