Followup Adding system preference XSLT*FileName

This patch fixes the name of the system preference according to the usage done in C4::XSLT
And also takes the value of the system preferences (XSLTDetailsDisplay and XSLTResultsDisplay) set in 3.0.6.03
rather than rewriting the value without taking a previous updated value into account
This commit is contained in:
Henri-Damien LAURENT 2010-05-17 04:30:36 +02:00
parent bc48e8d7dc
commit aefcbc11c6
1 changed files with 2 additions and 2 deletions

View File

@ -759,8 +759,8 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$DBversion = "3.00.06.010";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT systempreferences set value='../koha-tmpl/opac-tmpl/prog/en/xslt/".C4::Context->preference('marcflavour')."slim2OPACDetails.xsl',type='Free', variable='XSLTDetailsFilename' ;");
$dbh->do("INSERT systempreferences set value='../koha-tmpl/opac-tmpl/prog/en/xslt/".C4::Context->preference('marcflavour')."slim2OPACResults.xsl',type='Free', variable='XSLTResultsFilename' ;");
$dbh->do("INSERT systempreferences (value, variable) select value, 'XSLTDetailFilename' from systempreferences where variable='XSLTDetailsDisplay';");
$dbh->do("INSERT systempreferences (value, variable) select value, 'XSLTResultsFilename' from systempreferences where variable='XSLTResultsDisplay' ;");
$dbh->do("UPDATE systempreferences set value=(LENGTH(value)>0),type='YesNo' where variable='XSLTDetailsDisplay';");
$dbh->do("UPDATE systempreferences set value=(LENGTH(value)>0),type='YesNo' where variable='XSLTResultsDisplay';");
print "Upgrade to $DBversion done (Improvements to XSLT Support)\n";