From e356c6021454652429b8fae7920e526eec9654d8 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Tue, 18 Nov 2014 14:07:49 +0000 Subject: [PATCH] Bug 13285 Do the right thing if opacthemes is not set If opacthemes is not defined updatedatabase reports the subsequent warnings as an error. Take account of the case where it is not set and default that to bootstrap. This is probably a rare occurence, but should be handled Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 90c32e88561530143ced5d190445850291f6851e) Signed-off-by: Chris Cormack --- installer/data/mysql/updatedatabase.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ed426c3c56..c3f2cdc2e6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8922,7 +8922,7 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.17.00.040"; if ( CheckVersion($DBversion) ) { my $opac_theme = C4::Context->preference( 'opacthemes' ); - if ( $opac_theme eq 'prog' || $opac_theme eq 'ccsr' ) { + if ( !defined $opac_theme || $opac_theme eq 'prog' || $opac_theme eq 'ccsr' ) { $dbh->do("UPDATE systempreferences SET value='bootstrap' WHERE variable='opacthemes'"); } print "Upgrade to $DBversion done (Bug 12223: 'prog' and 'ccsr' themes removed)\n"; -- 2.39.5