From 052b77d13d136cbd1f63dfd5de00a4de2d896f22 Mon Sep 17 00:00:00 2001 From: Amit Gupta Date: Mon, 28 Oct 2013 12:08:27 +0530 Subject: [PATCH] [SIGNED-OFF] Bug 6810 Add new systempreference and sample notice (Membership Expiry notice) Content-Type: text/plain; charset="utf-8" Signed-off-by: Owen Leonard Tested both patches according to the test plan and found no problems. --- .../data/mysql/en/mandatory/sample_notices.sql | 5 +++++ installer/data/mysql/sysprefs.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 2281739..b04de1b 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -133,6 +133,7 @@ Thank you. Your library.' ); + INSERT INTO letter (module, code, branchcode, name, is_html, title, content) VALUES ( 'members', 'SHARE_ACCEPT', '', 'Notification about an accepted share', '0', 'Share on list <> accepted', 'Dear patron, @@ -142,3 +143,7 @@ Thank you. Your library.' ); + +INSERT INTO `letter` (`module`,`code`,`branchcode`,`name`,`is_html`,`title`,`content`) +VALUES ( +'members','MEMEXP','Membership Expiry Notice','Membership Expiry Notice','Dear <> <> <>,.\r\n\r\nYour membership expires soon on:\r\n\r\n<>\r\n\r\nThank you,\r\n\r\nLibrarian'); \ No newline at end of file diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 600279d..12a18bf 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -454,5 +454,5 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'), ('yuipath','local','local|http://yui.yahooapis.com/2.5.1/build','Insert the path to YUI libraries, choose local if you use koha offline','Choice'), ('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'), +('MembershipExpiryDaysNotice' ,14,'Send a membership expiry notice that a patron is about to expire after',NULL,'Integer'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e1fb8be..96b5a08 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8845,6 +8845,14 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{INSERT INTO `letter` (`module`, `code`, `name`, `title`,`content`) VALUES('members','MEMEXP','Membership Expiry','Your Membership Expires','Dear <> <> <>,.\r\n\r\nYour membership expires soon on:\r\n\r\n<>\r\n\r\nThank you,\r\n\r\nLibrarian')}); + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('MembershipExpiryDaysNotice',14,'Send a membership expiry notice that a patron is about to expire after',NULL,'Integer')"); + print "Upgrade to $DBversion done (Bug - 6810 Insert value in letter and syspref table for Membership expiry notifications)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 1.7.9.5