From 86583725ebea5012feabf5fd064210afdb8fad42 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 22 Sep 2023 08:30:35 +0200 Subject: [PATCH] Bug 34720: Say if syspref has been inserted Signed-off-by: Jonathan Druart Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit cd79c78dbdbddb6b4de548b79975bc68828c4169) Signed-off-by: Fridolin Somers --- installer/data/mysql/atomicupdate/bug_30403.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_30403.pl b/installer/data/mysql/atomicupdate/bug_30403.pl index 4e91ec1de7..49663a9f5a 100755 --- a/installer/data/mysql/atomicupdate/bug_30403.pl +++ b/installer/data/mysql/atomicupdate/bug_30403.pl @@ -7,12 +7,12 @@ return { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; - $dbh->do( + my $inserted = $dbh->do( q{ INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) VALUES ('UpdateNotForLoanStatusOnCheckout', '', 'NULL', 'This is a list of value pairs. When an item is checked out, if the not for loan value on the left matches the items not for loan value it will be updated to the right-hand value. E.g. ''-1: 0'' will cause an item that was set to ''Ordered'' to now be available for loan. Each pair of values should be on a separate line.', 'Free') } ); - say $out "Added new system preference 'UpdateNotForLoanStatusOnCheckout'"; + say $out ( $inserted == 1 ) ? "Added new system preference 'UpdateNotForLoanStatusOnCheckout'" : "Skipped - System preference exists already in DB" }, }; -- 2.39.5