Bug Fixing : Suggestions.pm warnings on line 132
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 13 Jul 2009 14:43:10 +0000 (16:43 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 13 Jul 2009 15:04:28 +0000 (17:04 +0200)
Adding use List::MoreUtils
filtering fieldnames using any

C4/Suggestions.pm

index 392ad9d..82a040e 100644 (file)
@@ -25,6 +25,7 @@ use Mail::Sendmail;
 use C4::Context;
 use C4::Output;
 use C4::Dates qw<format_date>;
+use List::MoreUtils;
 use base 'Exporter';  # parent would be better there
 our $VERSION = 3.01;
 our @EXPORT  = qw<
@@ -129,7 +130,7 @@ sub SearchSuggestion  {
                        } 
            } 
        } 
-    foreach my $field (grep {qw<
+    foreach my $field (grep {my $fieldname=$_; any {$fieldname eq $_ }qw<
        STATUS branchcode itemtype suggestedby managedby acceptedby
        bookfundid biblionumber
        >} keys %$suggestion