From 069439cc95c10681d1b4c0bcafa80e319e7b7d18 Mon Sep 17 00:00:00 2001 From: Amit Gupta Date: Mon, 28 Oct 2013 12:08:27 +0530 Subject: [PATCH 2/2] Bug 6810 Add new systempreference and sample notice (Membership Expiry notice) --- .../data/mysql/en/mandatory/sample_notices.sql | 4 ++++ installer/data/mysql/sysprefs.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 8 ++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 2d09971..a96d8ef 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -117,3 +117,7 @@ http://<>/cgi-bin/koha/opac-registration-verify.pl?token=<> <> <>,.\r\n\r\nYour membership expires soon on:\r\n\r\n<>\r\n\r\nThank you,\r\n\r\nLibrarian'); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 71513ce..5ede6e1 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -419,5 +419,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 b031ed8..0595d40 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7330,6 +7330,14 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.13.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