Bug 28373: DBRev 21.06.00.020
[koha.git] / installer / data / mysql / db_revs / 210600020.pl
1 use Modern::Perl;
2
3 return {
4     bug_number => "28373",
5     description => "Add new system preference PassItemMarcToXSLT",
6     up => sub {
7         my ($args) = @_;
8         my ($dbh, $out) = @$args{qw(dbh out)};
9         $dbh->do( q{
10             INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11             ('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo');
12         });
13         foreach my $pref ('XSLTDetailsDisplay','XSLTListsDisplay','XSLTResultsDisplay','OPACXSLTDetailsDisplay','OPACXSLTListsDisplay','OPACXSLTResultsDisplay'){
14             if( C4::Context->preference($pref) ne 'default' ){
15                 say $out "NOTE: You have defined a custom stylesheet for '$pref'. If it is utilizing item fields you must enable the system preference 'PassItemMarcToXSLT'";
16             }
17         }
18     },
19 }