Bug 32911: (follow-up) Only move config value from koha-conf.xml if it exists
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
cc175067b5
commit
3c24667a51
1 changed files with 9 additions and 6 deletions
|
@ -10,11 +10,14 @@ return {
|
|||
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'";
|
||||
if ( $existing_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'";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue