[Koha-patches] [PATCH] bug 4141: fix upgrade of OPAC XSLT parameters from 3.0.x

Galen Charlton gmcharlt at gmail.com
Wed Nov 3 18:49:00 CET 2010


Note that OPACXSLTResultsDisplay and OPACXSLTDetailsDisplay
are boolean parameters in 3.2.x, not string parameters.

Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 installer/data/mysql/updatedatabase.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 6490549..a6f6be6 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3448,11 +3448,11 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     my $value = C4::Context->preference("XSLTResultsDisplay");
     $dbh->do(
         "INSERT INTO systempreferences (variable,value,type)
-         VALUES('OPACXSLTResultsDisplay',$value,'YesNo')");
+         VALUES('OPACXSLTResultsDisplay',?,'YesNo')", {}, $value ? 1 : 0);
     $value = C4::Context->preference("XSLTDetailsDisplay");
     $dbh->do(
         "INSERT INTO systempreferences (variable,value,type)
-         VALUES('OPACXSLTDetailsDisplay',$value,'YesNo')");
+         VALUES('OPACXSLTDetailsDisplay',?,'YesNo')", {}, $value ? 1 : 0);
     print "Upgrade done (added two new syspref: OPACXSLTResultsDisplay and OPACXSLTDetailDisplay). You may have to go in Admin > System preference to tweak XSLT related syspref both in OPAC and Search tabs.\n     ";
     SetVersion ($DBversion);
 }
-- 
1.7.0



More information about the Koha-patches mailing list