Bug 16371: Add database updates
authorEmmi Takkinen <emmi.takkinen@outlook.com>
Fri, 10 Jul 2020 07:20:56 +0000 (10:20 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 13 Aug 2020 08:15:33 +0000 (10:15 +0200)
Sponsored-by: Koha-Suomi Oy

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

installer/data/mysql/atomicupdate/bug_16371-QOTD_for_the_staff_interface.perl [new file with mode: 0644]
installer/data/mysql/sysprefs.sql

diff --git a/installer/data/mysql/atomicupdate/bug_16371-QOTD_for_the_staff_interface.perl b/installer/data/mysql/atomicupdate/bug_16371-QOTD_for_the_staff_interface.perl
new file mode 100644 (file)
index 0000000..d5bf79c
--- /dev/null
@@ -0,0 +1,10 @@
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+    # you can use $dbh here like:
+    # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" );
+
+    $dbh->do( "UPDATE systempreferences SET value = '', 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'" );
+
+    # Always end with this (adjust the bug info)
+    NewVersion( $DBversion, 16371, "Bug 16371 - Quote of the Day (QOTD) for the staff interface ");
+}
index 6937558..d1efc4b 100644 (file)
@@ -522,7 +522,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('QueryRegexEscapeOptions', 'escape', 'dont_escape|escape|unescape_escaped', 'Escape option for regexps delimiters in Elasicsearch queries.', 'Choice'),
 ('QueryStemming','1',NULL,'If ON, enables query stemming','YesNo'),
 ('QueryWeightFields','1',NULL,'If ON, enables field weighting','YesNo'),
-('QuoteOfTheDay','0',NULL,'Enable or disable display of Quote of the Day on the OPAC home page','YesNo'),
+('QuoteOfTheDay','','intranet,opac','Enable or disable display of Quote of the Day on the OPAC and staff interface home page','multiple'),
 ('RandomizeHoldsQueueWeight','0',NULL,'if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight','YesNo'),
 ('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
 ('RefundLostOnReturnControl','CheckinLibrary','CheckinLibrary|ItemHomeBranch|ItemHoldingBranch','If a lost item is returned, choose which branch to pick rules for refunding.','Choice'),