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

(-)a/C4/Circulation.pm (-1 / +6 lines)
Lines 3072-3083 sub AnonymiseIssueHistory { Link Here
3072
    # The anonymisation will fail quietly if AnonymousPatron is not a valid entry
3072
    # The anonymisation will fail quietly if AnonymousPatron is not a valid entry
3073
    my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0;
3073
    my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0;
3074
    my @bind_params = ($anonymouspatron, $date);
3074
    my @bind_params = ($anonymouspatron, $date);
3075
3075
    if (defined $borrowernumber) {
3076
    if (defined $borrowernumber) {
3076
       $query .= " AND borrowernumber = ?";
3077
       $query .= " AND borrowernumber = ?";
3077
       push @bind_params, $borrowernumber;
3078
       push @bind_params, $borrowernumber;
3078
    } else {
3079
    } else {
3079
       $query .= " AND (SELECT privacy FROM borrowers WHERE borrowers.borrowernumber=old_issues.borrowernumber) <> 0";
3080
       $query .= " AND (SELECT privacy FROM borrowers WHERE borrowers.borrowernumber=old_issues.borrowernumber) <> 0";
3080
    }
3081
    }
3082
3083
    if ( C4::Context->preference('StoreLastBorrower') ) {
3084
        $query .= " AND issue_id IN ( SELECT issue_id FROM old_issues GROUP BY itemnumber ORDER BY issue_id DESC ) ";
3085
    }
3086
3081
    my $sth = $dbh->prepare($query);
3087
    my $sth = $dbh->prepare($query);
3082
    $sth->execute(@bind_params);
3088
    $sth->execute(@bind_params);
3083
    my $anonymisation_err = $dbh->err;
3089
    my $anonymisation_err = $dbh->err;
3084
- 

Return to bug 9011