Bug 8337 - Added prefs to sysprefs and updatedatabase
authormbeaulieu <mbeaulieu@inlibro.com>
Fri, 8 Aug 2014 18:22:58 +0000 (14:22 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 21 Nov 2014 21:55:44 +0000 (18:55 -0300)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl

index 4fb8cbd..cdff5d6 100644 (file)
@@ -469,5 +469,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'),
 ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'),
 ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
-('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo')
+('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'),
+('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');
 ;
index e36c20e..7742c57 100755 (executable)
@@ -9525,9 +9525,19 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($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')");
+    print "Upgrade to $DBversion done (Bug 8337: System preferences for longoverdue cron)\n";
+    SetVersion($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)
+a
 
 =cut