From: Henri-Damien LAURENT Date: Mon, 17 May 2010 02:30:36 +0000 (+0200) Subject: Followup Adding system preference XSLT*FileName X-Git-Tag: v3.00.06~1 X-Git-Url: http://git.rot13.org/?p=koha.git;a=commitdiff_plain;h=aefcbc11c6e53276805130bf4eceace79551a952 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 --- diff --git a/installer/data/mysql/updatedatabase30.pl b/installer/data/mysql/updatedatabase30.pl index abdbc767df..68b2796fba 100644 --- a/installer/data/mysql/updatedatabase30.pl +++ b/installer/data/mysql/updatedatabase30.pl @@ -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";