View | Details | Raw Unified | Return to bug 9596
Collapse All | Expand All

(-)a/misc/cronjobs/longoverdue.pl (-1 / +4 lines)
Lines 387-392 my $filter_borrower_categories = ( scalar @$borrower_category || scalar @$skip_b Link Here
387
387
388
my @available_branches = Koha::Libraries->search()->get_column('branchcode');
388
my @available_branches = Koha::Libraries->search()->get_column('branchcode');
389
my %branches_to_process;
389
my %branches_to_process;
390
# If --branch was used, validate any branchcode passed in and mark them as branches to use
390
for my $lib (@branches) {
391
for my $lib (@branches) {
391
    unless ( grep { $_ eq $lib } @available_branches ) {
392
    unless ( grep { $_ eq $lib } @available_branches ) {
392
        pod2usage(
393
        pod2usage(
Lines 396-401 for my $lib (@branches) { Link Here
396
    }
397
    }
397
    $branches_to_process{$lib} = 1;
398
    $branches_to_process{$lib} = 1;
398
}
399
}
400
# If --skip-branch was used, validate any branchcode passed in and mark them as branches to *not* use
399
if (@skip_branches) {
401
if (@skip_branches) {
400
    for my $lib (@skip_branches) {
402
    for my $lib (@skip_branches) {
401
        unless ( grep { $_ eq $lib } @available_branches ) {
403
        unless ( grep { $_ eq $lib } @available_branches ) {
Lines 406-411 if (@skip_branches) { Link Here
406
        }
408
        }
407
    }
409
    }
408
    %branches_to_process = map { $_ => 1 } @available_branches;
410
    %branches_to_process = map { $_ => 1 } @available_branches;
411
    # The mapped 0 values here will overwrite the corrosponding mapped 1 values
412
    # where the 0 values exist
409
    %branches_to_process = ( %branches_to_process, map { $_ => 0 } @skip_branches );
413
    %branches_to_process = ( %branches_to_process, map { $_ => 0 } @skip_branches );
410
}
414
}
411
415
412
- 

Return to bug 9596