overdue_notices.pl various bugs in HEAD 3.2
authorFrédéric Demians <f.demians@tamil.fr>
Fri, 8 Jan 2010 22:04:14 +0000 (23:04 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 15 Jan 2010 08:59:19 +0000 (09:59 +0100)
Those bugs must have been introduced by merge?

- Overdue to all libraries with overdue rules doesn't work
- Overdue to a specific library doesn't work also

misc/cronjobs/overdue_notices.pl

index 94a1fcd..0923efc 100755 (executable)
@@ -290,7 +290,7 @@ if (@branchcodes) {
     @branches = grep { $seen{$_} } @overduebranches;
     
     
-    if (@branches) {
+    if (@overduebranches) {
 
        my $branch_word = scalar @branches > 1 ? 'branches' : 'branch';
        $verbose and warn "$branch_word @branches have overdue rules\n";
@@ -327,6 +327,7 @@ if ( defined $csvfilename ) {
     }
 }
 
+@branches = @overduebranches unless @branches;
 foreach my $branchcode (@branches) {
 
     my $branch_details = C4::Branch::GetBranchDetail($branchcode);