From c35abf453d00c5a7483410639aff64bdb88e183b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 16 Jan 2014 11:02:59 +0100 Subject: [PATCH] [SIGNED OFF] Bug 11237: Update default value for pref AcqItemSetSubfieldsWhenReceived The default value for this pref should be an empty string, not "0". Signed-off-by: Mark Tompsett --- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 5d37379..6ebce00 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -1,6 +1,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('AcqCreateItem','ordering','ordering|receiving|cataloguing','Define when the item is created : when ordering, when receiving, or in cataloguing module','Choice'), -('AcqItemSetSubfieldsWhenReceived','0','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'), +('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'), ('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7f706c1..2965dbe 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7919,7 +7919,14 @@ if(CheckVersion($DBversion)) { SET explanation = 'Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")' WHERE variable = "AcqItemSetSubfieldsWhenReceived" }); - print "Upgrade to $DBversion done (Bug 11237: Update explanation for AcqItemSetSubfieldsWhenReceived syspref)\n"; + + $dbh->do(q{ + UPDATE systempreferences + SET value = '' + WHERE variable = "AcqItemSetSubfieldsWhenReceived" + AND value = "0" + }); + print "Upgrade to $DBversion done (Bug 11237: Update explanation and default value for AcqItemSetSubfieldsWhenReceived syspref)\n"; SetVersion($DBversion); } -- 1.7.9.5