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

(-)a/C4/Circulation.pm (-1 / +6 lines)
Lines 2880-2891 sub AnonymiseIssueHistory { Link Here
2880
    # The anonymisation will fail quietly if AnonymousPatron is not a valid entry
2880
    # The anonymisation will fail quietly if AnonymousPatron is not a valid entry
2881
    my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0;
2881
    my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0;
2882
    my @bind_params = ($anonymouspatron, $date);
2882
    my @bind_params = ($anonymouspatron, $date);
2883
2883
    if (defined $borrowernumber) {
2884
    if (defined $borrowernumber) {
2884
       $query .= " AND borrowernumber = ?";
2885
       $query .= " AND borrowernumber = ?";
2885
       push @bind_params, $borrowernumber;
2886
       push @bind_params, $borrowernumber;
2886
    } else {
2887
    } else {
2887
       $query .= " AND (SELECT privacy FROM borrowers WHERE borrowers.borrowernumber=old_issues.borrowernumber) <> 0";
2888
       $query .= " AND (SELECT privacy FROM borrowers WHERE borrowers.borrowernumber=old_issues.borrowernumber) <> 0";
2888
    }
2889
    }
2890
2891
    if ( C4::Context->preference('StoreLastBorrower') ) {
2892
        $query .= " AND issue_id IN ( SELECT issue_id FROM old_issues GROUP BY itemnumber ORDER BY issue_id DESC ) ";
2893
    }
2894
2889
    my $sth = $dbh->prepare($query);
2895
    my $sth = $dbh->prepare($query);
2890
    $sth->execute(@bind_params);
2896
    $sth->execute(@bind_params);
2891
    my $anonymisation_err = $dbh->err;
2897
    my $anonymisation_err = $dbh->err;
2892
- 

Return to bug 9011