From a38611eb8e9cb88fa795b76e7f75a245912748f2 Mon Sep 17 00:00:00 2001 From: Amit Gupta Date: Mon, 28 Oct 2013 12:08:27 +0530 Subject: [PATCH] Bug 6810 [Revised] Add new systempreference and sample notice (Membership Expiry notice) Content-Type: text/plain; charset="utf-8" This updated version of the database update patch revises the description of the system preference and the content of the notice to use the phrase "account expiration" or "card expiration," both of which are currently used in Koha templates. --- .../data/mysql/en/mandatory/sample_notices.sql | 5 +++++ installer/data/mysql/sysprefs.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/admin/preferences/patrons.pref | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 2281739..15f9b25 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','Account expiration','Account expiration','Dear <> <> <>,.\r\n\r\nYour library card will expire 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..c1abcb1 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -192,6 +192,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'), ('maxRecordsForFacets','20',NULL,NULL,'Integer'), ('maxreserves','50','','Define maximum number of holds a patron can place','Integer'), +('MembershipExpiryDaysNotice' ,14,'Send an account expiration notice that a patron\'s card is about to expire after',NULL,'Integer'), ('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'), ('NewItemsDefaultLocation','','','If set, all new items will have a location of the given Location Code ( Authorized Value type LOC )',''), ('noissuescharge','5','','Define maximum amount withstanding before check outs are blocked','Integer'), @@ -454,5 +455,4 @@ 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'); \ No newline at end of file diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e1fb8be..9afab86 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','Account expiration','Account expiration','Dear <> <> <>,\r\n\r\nYour library card will expire 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 an account expiration notice that a patron''s card is about to expire after',NULL,'Integer')"); + print "Upgrade to $DBversion done (Bug - 6810 Insert value in letter and syspref table for account expiration notifications)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 8802fb9..a0b147c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -90,7 +90,7 @@ Patrons: class: integer - days beforehand. - - - Send a membership expiry notice that a patron is about to expire after + - "Send an account expiration notice when a patron's card will expire in" - pref: MembershipExpiryDaysNotice class: integer - days. -- 1.7.9.5