bug 4141: fix upgrade of OPAC XSLT parameters from 3.0.x

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>
This commit is contained in:
Galen Charlton 2010-11-03 13:49:00 -04:00 committed by Chris Cormack
parent 47391d4e5a
commit be997f924e
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}