From a73395f7facfb36de682ee5c7e7148a150525963 Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Fri, 8 Oct 2021 06:45:42 -0400 Subject: [PATCH] Bug 28373: DBRev 21.05.03.003 --- ...g28373_add_PassItemMarcToXSLT_preference.perl | 15 --------------- installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug28373_add_PassItemMarcToXSLT_preference.perl diff --git a/installer/data/mysql/atomicupdate/bug28373_add_PassItemMarcToXSLT_preference.perl b/installer/data/mysql/atomicupdate/bug28373_add_PassItemMarcToXSLT_preference.perl deleted file mode 100644 index ef7ec1e5e8..0000000000 --- a/installer/data/mysql/atomicupdate/bug28373_add_PassItemMarcToXSLT_preference.perl +++ /dev/null @@ -1,15 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - $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' ){ - print "NOTE: You have defined a custom stylesheet. If your custom stylesheets are utilizing item fields you must enable the system preference 'PassItemMarcToXSLT'\n"; - last; - } - } - - NewVersion( $DBversion, 28373, "Add PassItemMarcToXSLT system preference"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a640d837fe..26dd59e3df 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24466,6 +24466,22 @@ if ( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 28772, "Store hashed API key secrets" ); } +$DBversion = '21.05.03.003'; +if ( CheckVersion( $DBversion ) ) { + $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' ){ + print "NOTE: You have defined a custom stylesheet. If your custom stylesheets are utilizing item fields you must enable the system preference 'PassItemMarcToXSLT'\n"; + last; + } + } + + NewVersion( $DBversion, 28373, "Add PassItemMarcToXSLT system preference"); +} + $DBversion = '21.05.04.000'; if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, "", "Koha 21.05.04 release" ); -- 2.39.5