From 721d586ab1ce21b81c76a003bc11d553a5eb1616 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 8 Feb 2023 17:06:56 +0000 Subject: [PATCH] Bug 32911: Database update Signed-off-by: Katrin Fischer --- .../data/mysql/atomicupdate/bug_32911.pl | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_32911.pl diff --git a/installer/data/mysql/atomicupdate/bug_32911.pl b/installer/data/mysql/atomicupdate/bug_32911.pl new file mode 100755 index 0000000000..44176d1a05 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_32911.pl @@ -0,0 +1,20 @@ +use Modern::Perl; + +return { + bug_number => "32911", + description => "Remove ILL partner_code config from koha-conf.xml and turn it into a system preference", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + my $xml_config = C4::Context->config("interlibrary_loans"); + my $existing_partner_code = $xml_config->{partner_code}; + + $dbh->do(qq{ + INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) + VALUES ('ILLPartnerCode', '$existing_partner_code', NULL, 'Patrons from this patron category will be used as partners to place ILL requests with', 'free'); + }); + + say $out "Moved value of partner_code in koha-conf.xml into new system preference 'ILLPartnerCode'"; + } +}; -- 2.30.2