From 591bae324d77d285b27dfa6e10dc7001671f53cc Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Sun, 10 Jun 2012 18:16:33 +0200 Subject: [PATCH] Bug 4246 Follow-up updatedatabase --- installer/data/mysql/updatedatabase.pl | 27 ++++++++++++++++++++++++++ kohaversion.pl | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 62b437202d..9b02cb935d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -5343,6 +5343,33 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion ="3.09.00.014"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + # add phone message transport type + $dbh->do("INSERT INTO message_transport_types (message_transport_type) VALUES ('phone')"); + + # adds HOLD_PHONE and PREDUE_PHONE letters (as placeholders) + $dbh->do("INSERT INTO letter (module, code, name, title, content) VALUES + ('reserves', 'HOLD_PHONE', 'Item Available for Pick-up (phone notice)', 'Item Available for Pick-up (phone notice)', 'Your item is available for pickup'), + ('circulation', 'PREDUE_PHONE', 'Advance Notice of Item Due (phone notice)', 'Advance Notice of Item Due (phone notice)', 'Your item is due soon'), + ('circulation', 'OVERDUE_PHONE', 'Overdue Notice (phone notice)', 'Overdue Notice (phone notice)', 'Your item is overdue') + "); + + # add phone notifications to patron message preferences options + $dbh->do("INSERT INTO message_transports + (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES + (4, 'phone', 0, 'reserves', 'HOLD_PHONE'), + (2, 'phone', 0, 'circulation', 'PREDUE_PHONE') + "); + + # add TalkingTechItivaPhoneNotification syspref + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('TalkingTechItivaPhoneNotification',0,'If ON, enables Talking Tech I-tiva phone notifications',NULL,'YesNo');"); + + print "Upgrade done (Support for Talking Tech i-tiva phone notification system)\n"; + SetVersion($DBversion); +} + + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/kohaversion.pl b/kohaversion.pl index 5f042f2714..6e5d80c198 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.09.00.013'; + our $VERSION = '3.09.00.014'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5