From 4272f8c0dd65e24374e5baa099ac9bd920c97758 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. --- 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 05b05442509..8d66de86cbf 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.25.1