[open-ils-commits] r10348 - in trunk/Open-ILS/src:
perlmods/OpenILS/Application/Storage/Publisher support-scripts
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 12 22:22:09 EDT 2008
Author: miker
Date: 2008-08-12 22:22:07 -0400 (Tue, 12 Aug 2008)
New Revision: 10348
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
trunk/Open-ILS/src/support-scripts/fine_generator.pl
Log:
protect against a 0 grace period
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm 2008-08-13 02:22:03 UTC (rev 10347)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm 2008-08-13 02:22:07 UTC (rev 10348)
@@ -95,7 +95,11 @@
my $c_t = action::circulation->table;
- $grace = " - ($grace * (fine_interval))" if ($grace);
+ if ($grace) {
+ $grace = " - ($grace * (fine_interval))";
+ } else {
+ $grace = '';
+ }
my $sql = <<" SQL";
SELECT *
Modified: trunk/Open-ILS/src/support-scripts/fine_generator.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/fine_generator.pl 2008-08-13 02:22:03 UTC (rev 10347)
+++ trunk/Open-ILS/src/support-scripts/fine_generator.pl 2008-08-13 02:22:07 UTC (rev 10348)
@@ -12,8 +12,10 @@
my $config = shift || die "bootstrap config required\n";
my $lockfile = shift || "/tmp/generate_fines-LOCK";
-my $grace = int(shift()) || 1;
+my $grace = shift;
+$grace = '' if (!defined($grace) or $grace == 0);
+
if (-e $lockfile) {
open(F,$lockfile);
my $pid = <F>;
More information about the open-ils-commits
mailing list