Bug 12233: change opacthemes syspref from {prog|ccsr} to bootstrap MM-OPAC/theme_dep
authorTomas Cohen Arazi <tomascohen@gmail.com>
Sun, 10 Aug 2014 13:37:26 +0000 (10:37 -0300)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 29 Oct 2014 23:30:21 +0000 (12:30 +1300)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

installer/data/mysql/updatedatabase.pl

index 3739f38..29257a8 100755 (executable)
@@ -8917,6 +8917,15 @@ if ( CheckVersion($DBversion) ) {
     ('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes')");
     print "Upgrade to $DBversion done (Bug 12539 - PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm)\n";
     SetVersion ($DBversion);
+
+$DBversion = "3.17.00.XXX";
+if ( CheckVersion($DBversion) ) {
+    my $opac_theme = C4::Context->preference( 'opacthemes' );
+    if ( $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";
+    SetVersion($DBversion);
 }
 
 =head1 FUNCTIONS