bug 4141: fix upgrade of OPAC XSLT parameters from 3.0.x
authorGalen Charlton <gmcharlt@gmail.com>
Wed, 3 Nov 2010 17:49:00 +0000 (13:49 -0400)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Wed, 3 Nov 2010 18:28:34 +0000 (14:28 -0400)
Note that OPACXSLTResultsDisplay and OPACXSLTDetailsDisplay
are boolean parameters in 3.2.x, not string parameters.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
installer/data/mysql/updatedatabase.pl

index 6490549..a6f6be6 100755 (executable)
@@ -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);
 }