From c559cdeec007071c556c84fe107affec752746cc Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 11 Nov 2021 15:29:39 -0300 Subject: [PATCH] Bug 28374: (QA follow-up) Avoid adding duplicate USE Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- installer/data/mysql/atomicupdate/bug_28374.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_28374.pl b/installer/data/mysql/atomicupdate/bug_28374.pl index bc03104d55..049dce3ccc 100755 --- a/installer/data/mysql/atomicupdate/bug_28374.pl +++ b/installer/data/mysql/atomicupdate/bug_28374.pl @@ -8,7 +8,11 @@ return { my ($dbh, $out) = @$args{qw(dbh out)}; $dbh->do(q{ - UPDATE letter SET content = CONCAT('[% USE KohaDates %][% USE Branches %][% USE Price %]', content), is_html = 1 WHERE code = 'RECEIPT'; + UPDATE letter + SET content = CONCAT('[% USE KohaDates %][% USE Branches %][% USE Price %]', content), + is_html = 1 + WHERE code = 'RECEIPT' + AND content NOT LIKE '%[\% USE KohaDates \%][\% USE Branches \%][\% USE Price \%]%'; }); say $out "Added KohaDates, Branches and Price plugins"; -- 2.39.5