From 6827107ed48fadac534e34528c6855c65ef48bc4 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Tue, 16 Feb 2010 10:56:03 -0500 Subject: [PATCH] Bugfix: [2/3] overdue_notices.pl does not process all advertised fields 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 --- Makefile.PL | 1 + about.pl | 1 + installer/data/mysql/updatedatabase.pl | 14 ++++++++++++++ 3 files changed, 16 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index 5aa93104a3..d6c7fcfa11 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 f92d211b4a..04a9675c01 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 e78a587a33..90c10e93fe 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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 -- 2.20.1