Bug 28373: Add warning if custom stylesheets are defined
This patch adds a check of the current XSLT prefs and warns to check the new pref if any are not set to default Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
2bc48bc748
commit
192d5bf13b
1 changed files with 6 additions and 0 deletions
|
@ -4,6 +4,12 @@ if( CheckVersion( $DBversion ) ) {
|
||||||
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
|
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');
|
('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");
|
NewVersion( $DBversion, 28373, "Add PassItemMarcToXSLT system preference");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue