From: Jonathan Druart Date: Mon, 13 Jan 2014 08:41:22 +0000 (+0100) Subject: Bug 7825: (follow-up) clarify the yes and no values X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=0f657f7a5f55eac2036c526fbc5eab069a08713c;p=koha_fer Bug 7825: (follow-up) clarify the yes and no values The value of the pref should be '1' (for yes) or '0' (for no). The options could be kept as 'yes' and 'no': since the ImplicitTyping is set, yes/no would become '1/0'. But I think it is preferable not to use the yes/no value in order not to introduce a bug here if ImplicitTyping is unset later. Signed-off-by: Katrin Fischer Signed-off-by: Galen Charlton --- diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 3c01fb2da7..fd88466e3e 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -238,7 +238,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'), ('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'), ('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'), -('OPACItemHolds','yes','no|yes|force','Allow OPAC users to place hold on specific items. If No, users can only request next available copy. If Yes, users can choose between next available and specific copy. If Force, users *must* choose a specific copy.','Choice'), +('OPACItemHolds','1','0|1|force','Allow OPAC users to place hold on specific items. If No, users can only request next available copy. If Yes, users can choose between next available and specific copy. If Force, users *must* choose a specific copy.','Choice'), ('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'), ('OPACItemsResultsDisplay','0','','If OFF : show only the status of items in result list.If ON : show full location of items (branch+location+callnumber) as in staff interface','YesNo'), ('OpacKohaUrl','1',NULL,'Show \'Powered by Koha\' text on OPAC footer.',NULL), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3b9dba9d97..b8fad87d2b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8512,10 +8512,10 @@ CREATE TABLE IF NOT EXISTS `misc_files` ( SetVersion($DBversion); } -$DBversion = "3.13.00.XXX"; +$DBversion = "3.15.00.XXX"; if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { - $dbh->do("UPDATE systempreferences SET type = 'Choice', options = 'no|yes|force' WHERE variable = 'OPACItemHolds'"); - print "Upgrade to $DBversion done (Changed OPACItemHolds syspref to Choice)\n"; + $dbh->do("UPDATE systempreferences SET type = 'Choice', options = '0|1|force' WHERE variable = 'OPACItemHolds'"); + print "Upgrade to $DBversion done (Bug 7825 - Changed OPACItemHolds syspref to Choice)\n"; SetVersion($DBversion); }