Koha/installer/data/mysql/db_revs/210600020.pl
Jonathan Druart 9a56bf98c1 Bug 28373: DBRev 21.06.00.020
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-08-31 10:27:52 +02:00

19 lines
957 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "28373",
description => "Add new system preference PassItemMarcToXSLT",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do( q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo');
});
foreach my $pref ('XSLTDetailsDisplay','XSLTListsDisplay','XSLTResultsDisplay','OPACXSLTDetailsDisplay','OPACXSLTListsDisplay','OPACXSLTResultsDisplay'){
if( C4::Context->preference($pref) ne 'default' ){
say $out "NOTE: You have defined a custom stylesheet for '$pref'. If it is utilizing item fields you must enable the system preference 'PassItemMarcToXSLT'";
}
}
},
}