Bugfix: [2/3] overdue_notices.pl does not process all advertised fields
authorChris Nighswonger <cnighswonger@foundations.edu>
Tue, 16 Feb 2010 15:56:03 +0000 (10:56 -0500)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 17 Feb 2010 11:36:08 +0000 (06:36 -0500)
This patch adds a dependency requirement for Locale::Currency::Format

NOTE: It does not adjust kohaversion.pl and sets the dev version to XXX.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

Makefile.PL
about.pl
installer/data/mysql/updatedatabase.pl

index 5aa9310..d6c7fcf 100644 (file)
@@ -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,
index f92d211..04a9675 100755 (executable)
--- 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
index e78a587..90c10e9 100755 (executable)
@@ -3457,6 +3457,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