From 4891c2ef46f6f5cfa365eb4c068e2beeb9984312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9rick?= Date: Fri, 24 Aug 2012 14:54:04 -0400 Subject: [PATCH 2/2] Add a default RECALL notice to the database For use with the "Recall button" feature Patch sponsored by the CCSR ( http://www.ccsr.qc.ca ) --- .../data/mysql/en/mandatory/sample_notices.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 9 +++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql index 6fa0a54..41a6bd1 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.sql +++ b/installer/data/mysql/en/mandatory/sample_notices.sql @@ -15,6 +15,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library.\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>'), ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>'), ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <>\n\nThank you,\n\n<>'), +('circulation','RECALL','Item recall','Item recall','Dear <> <>,\r\n\r\nA recall was made on an item in your possession. Please return the item to the library as soon as possible.\r\n\r\n<>\r\n<>\r\n<> <>\r\nPhone: <>\r\nFax: <>\r\nEmail: <>\r\n\r\nThe following item must be returned to the library as soon as possible :\r\n\r\n\"<>\" by <>, <>, Barcode: <>\r\n\r\nThank you.\r\n\r\n<> \r\n'), ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <> <>,\n\nYou have suggested that the library acquire <> by <>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <>\n\nIf you have any questions, please email us at <>.\n\nThank you,\n\n<>'); INSERT INTO `letter` (module, code, name, title, content, is_html) VALUES ('circulation','ISSUESLIP','Issue Slip','Issue Slip', '

<>

@@ -105,3 +106,4 @@ Date due: <>
  • <>
  • <>
  • ', 1); + diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ed0c674..bd74371 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -5635,6 +5635,15 @@ if(C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = 'XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `letter` VALUES +('circulation','RECALL','Item recall','Item recall','Dear <> <>,\r\n\r\nA recall was made on an item in your possession. Please return the item to the library as soon as possible.\r\n\r\n<>\r\n<>\r\n<> <>\r\nPhone: <>\r\nFax: <>\r\nEmail: <>\r\n\r\nThe following item must be returned to the library as soon as possible :\r\n\r\n\"<>\" by <>, <>, Barcode: <>\r\n\r\nThank you.\r\n\r\n<> \r\n'); +"); + print "Upgrade to $DBversion done ( Add the 'RECALL' letter )\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 1.7.2.5