Bug 34720: Say if syspref has been inserted

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-09-22 08:30:35 +02:00 committed by Tomas Cohen Arazi
parent d91ea53e90
commit cd79c78dbd
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 2 additions and 2 deletions

View File

@ -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"
},
};