[Koha-patches] [PATCH] Bugfix: [2/3] overdue_notices.pl does not process all advertised fields

Chris Nighswonger cnighswonger at foundations.edu
Tue Feb 16 16:56:03 CET 2010


This patch adds a dependency requirement for Locale::Currency::Format

NOTE: It does not adjust kohaversion.pl and sets the dev version to XXX.
---
 Makefile.PL                            |    1 +
 about.pl                               |    1 +
 installer/data/mysql/updatedatabase.pl |   14 ++++++++++++++
 3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/Makefile.PL b/Makefile.PL
index 5aa9310..d6c7fcf 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -577,6 +577,7 @@ WriteMakefile(
 			    'Lingua::Stem::Snowball'	       => 0.952,
                             'List::Util'                       => 1.18,
                             'List::MoreUtils'                  => 0.21,
+                            'Locale::Currency::Format'         => 1.28,
                             'Locale::Language'                 => 2.07,
                             'MARC::Charset'                    => 0.98,
                             'MARC::Crosswalk::DublinCore'      => 0.02,
diff --git a/about.pl b/about.pl
index f92d211..04a9675 100755
--- a/about.pl
+++ b/about.pl
@@ -101,6 +101,7 @@ Lingua::Stem
 Lingua::Stem::Snowball
 List::Util
 List::MoreUtils
+Locale::Currency::Format
 Locale::Language
 MARC::Crosswalk::DublinCore
 MARC::Charset
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 32ad48b..4c94af6 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3445,6 +3445,20 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+$DBversion = '3.01.00.XXX';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    eval{use Locale::Currency::Format};
+    if (!$@) {
+        print "Upgrade to $DBversion done (Locale::Currency::Format installed.)\n";
+        SetVersion ($DBversion);
+    }
+    else {
+        print "Upgrade to $DBversion done.\n";
+        print "NOTICE: The Locale::Currency::Format package is not installed on your system or not found in \@INC.\nThis dependency is required in order to include fine information in overdue notices.\nPlease ask your system administrator to install this package.\n";
+        SetVersion ($DBversion);
+    }
+}
+
 =item DropAllForeignKeys($table)
 
   Drop all foreign keys of the table $table
-- 
1.6.0.4




More information about the Koha-patches mailing list