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

(-)a/misc/maintenance/borrowers-force-messaging-defaults.pl (-1 / +3 lines)
Lines 57-62 sub force_borrower_messaging_defaults { Link Here
57
    $sql .= " AND categorycode = ?" if $category;
57
    $sql .= " AND categorycode = ?" if $category;
58
    my $sth = $dbh->prepare($sql);
58
    my $sth = $dbh->prepare($sql);
59
    $sth->execute($since, $category || () );
59
    $sth->execute($since, $category || () );
60
    my $cnt = 0;
60
    while ( my ($borrowernumber, $categorycode) = $sth->fetchrow ) {
61
    while ( my ($borrowernumber, $categorycode) = $sth->fetchrow ) {
61
        print "$borrowernumber: $categorycode\n";
62
        print "$borrowernumber: $categorycode\n";
62
        next unless $doit;
63
        next unless $doit;
Lines 64-71 sub force_borrower_messaging_defaults { Link Here
64
            borrowernumber => $borrowernumber,
65
            borrowernumber => $borrowernumber,
65
            categorycode   => $categorycode,
66
            categorycode   => $categorycode,
66
        } );
67
        } );
68
        $cnt++;
67
    }
69
    }
68
    $dbh->commit();
70
    $dbh->commit();
71
    print "Total borrowers updated: $cnt\n" if $doit;
69
}
72
}
70
73
71
74
72
- 

Return to bug 19454