From 7d253c0fbf3acf9788c6954f9a0ee479b897730a Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 21 Nov 2014 19:38:35 -0300 Subject: [PATCH] Bug 8337: (RM followup) make sysprefs match case of the .pref file Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/sysprefs.sql | 6 +++--- installer/data/mysql/updatedatabase.pl | 13 ++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 1dd9bc391f..c3e308f035 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -97,9 +97,9 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('decreaseLoanHighHoldsValue',NULL,'','Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)','Integer'), ('DefaultClassificationSource','ddc',NULL,'Default classification scheme used by the collection. E.g., Dewey, LCC, etc.','ClassSources'), ('DefaultLanguageField008','','','Fill in the default language for field 008 Range 35-37 of MARC21 records (e.g. eng, nor, ger, see MARC Code List for Languages)','Free'), -('defaultLongOverdueChargeValue', NULL, NULL, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'), -('defaultLongOverdueDays', NULL, NULL, "Set the LOST value of an item when the item has been overdue for more than n days.", 'integer'), -('defaultLongOverdueLostValue', NULL, NULL, "Set the LOST value of an item to n when the item has been overdue for more than defaultlongoverduedays days.", 'integer'), +('DefaultLongOverdueChargeValue', NULL, NULL, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'), +('DefaultLongOverdueDays', NULL, NULL, "Set the LOST value of an item when the item has been overdue for more than n days.", 'integer'), +('DefaultLongOverdueLostValue', NULL, NULL, "Set the LOST value of an item to n when the item has been overdue for more than defaultlongoverduedays days.", 'integer'), ('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), ('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'), ('delimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7742c57cbb..fadc57a3d6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9439,7 +9439,7 @@ if ( CheckVersion($DBversion) ) { } $DBversion = "3.17.00.053"; -if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { +if ( CheckVersion($DBversion) ) { $dbh->do(q{ INSERT INTO permissions (module_bit, code, description) VALUES ('9', 'edit_items_restricted', 'Limit item modification to subfields defined in the SubfieldsToAllowForRestrictedEditing preference (please note that edit_item is still required)'); }); @@ -9481,7 +9481,7 @@ if (CheckVersion($DBversion)) { } $DBversion = "3.17.00.055"; -if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { +if ( CheckVersion($DBversion) ) { $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBEnable', '0', NULL, 'Enable communication with the Norwegian national patron database.', 'YesNo')"); $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBEndpoint', '', NULL, 'Which NL endpoint to use.', 'Free')"); $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBUsername', '', NULL, 'Username for communication with the Norwegian national patron database.', 'Free')"); @@ -9506,7 +9506,7 @@ CREATE TABLE borrower_sync ( } $DBversion = "3.17.00.056"; -if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { +if ( CheckVersion($DBversion) ) { $dbh->do(q{ UPDATE systempreferences SET value = 'pubdate,itemtype,language,sorting,location' WHERE variable='OpacAdvSearchOptions' }); @@ -9527,9 +9527,9 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.17.00.XXX"; if( CheckVersion($DBversion) ){ - $dbh->do("INSERT INTO systempreferences (variable, explanation, type) VALUES('defaultlongoverduechargevalue','Charge a lost item to the borrower account when the LOST value of the item changes to n', 'integer')"); - $dbh->do("INSERT INTO systempreferences (variable, explanation, type) VALUES('defaultlongoverduelostvalue', 'Set the LOST value of an item to n when the item has been overdue for more than defaultlongoverduedays days.', 'integer')"); - $dbh->do("INSERT INTO systempreferences (variable, explanation, type) VALUES('defaultlongoverduedays', 'Set the LOST value of an item when the item has been overdue for more than n days.', 'integer')"); + $dbh->do("INSERT INTO systempreferences (variable, explanation, type) VALUES('DefaultLongOverdueChargeValue','Charge a lost item to the borrower account when the LOST value of the item changes to n', 'integer')"); + $dbh->do("INSERT INTO systempreferences (variable, explanation, type) VALUES('DefaultLongOverdueLostValue', 'Set the LOST value of an item to n when the item has been overdue for more than defaultlongoverduedays days.', 'integer')"); + $dbh->do("INSERT INTO systempreferences (variable, explanation, type) VALUES('DefaultLongOverdueDays', 'Set the LOST value of an item when the item has been overdue for more than n days.', 'integer')"); print "Upgrade to $DBversion done (Bug 8337: System preferences for longoverdue cron)\n"; SetVersion($DBversion); } @@ -9537,7 +9537,6 @@ if( CheckVersion($DBversion) ){ =head1 FUNCTIONS =head2 TableExists($table) -a =cut -- 2.39.5