[Koha-patches] [PATCH] bug 2505: remove additional warning messages

Galen Charlton gmcharlt at gmail.com
Sun Sep 6 01:51:41 CEST 2009


Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 tools/overduerules.pl |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/tools/overduerules.pl b/tools/overduerules.pl
index e14d1d8..a7d6510 100755
--- a/tools/overduerules.pl
+++ b/tools/overduerules.pl
@@ -90,7 +90,13 @@ if ($op eq 'save') {
                     my $type = $1; # data type
                     my $num = $2; # From 1 to 3
                     my $bor = $3; # borrower category
-                    $temphash{$bor}->{"$type$num"}=$input->param("$key") if (($input->param("$key") ne "") or ($input->param("$key")>0));
+                    my $value = $input->param($key);
+                    if ($type eq 'delay') {
+                        $temphash{$bor}->{"$type$num"} = ($value =~ /^\d+$/ && int($value) > 0) ? int($value) : '';
+                    } else {
+                        # type is letter
+                        $temphash{$bor}->{"$type$num"} = $value if $value ne '';
+                    }
             }
     }
 
-- 
1.6.3.3




More information about the Koha-patches mailing list