From 2b8077ad73f86e3ec9d6b7ef881e68e4016d9679 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 13 Aug 2020 10:28:24 +0200 Subject: [PATCH] Bug 16371: (follow-up) DB changes We need to keep "opac" is the pref was set before the upgrade Signed-off-by: Jonathan Druart https://bugs.koha-community.org/show_bug.cgi?id=16112 --- installer/data/mysql/updatedatabase.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index d2bd7cb93f..6c335c29b8 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22576,15 +22576,17 @@ if( CheckVersion( $DBversion ) ) { $DBversion = '20.06.00.023'; if( CheckVersion( $DBversion ) ) { + my $QuoteOfTheDay = C4::Context->preference('QuoteOfTheDay'); $dbh->do( q| UPDATE systempreferences - SET value = '', - options = 'intranet,opac', + SET options = 'intranet,opac', explanation = 'Enable or disable display of Quote of the Day on the OPAC and staff interface home page', type = 'multiple' WHERE variable = 'QuoteOfTheDay' | ); + C4::Context->set_preference('QuoteOfTheDay', $QuoteOfTheDay ? 'opac' : ''); + NewVersion( $DBversion, 16371, "Quote of the Day (QOTD) for the staff interface " ); } -- 2.17.1