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

(-)a/C4/Circulation.pm (-1 / +6 lines)
Lines 3189-3200 sub AnonymiseIssueHistory { Link Here
3189
    # The anonymisation will fail quietly if AnonymousPatron is not a valid entry
3189
    # The anonymisation will fail quietly if AnonymousPatron is not a valid entry
3190
    my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0;
3190
    my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0;
3191
    my @bind_params = ($anonymouspatron, $date);
3191
    my @bind_params = ($anonymouspatron, $date);
3192
3192
    if (defined $borrowernumber) {
3193
    if (defined $borrowernumber) {
3193
       $query .= " AND borrowernumber = ?";
3194
       $query .= " AND borrowernumber = ?";
3194
       push @bind_params, $borrowernumber;
3195
       push @bind_params, $borrowernumber;
3195
    } else {
3196
    } else {
3196
       $query .= " AND (SELECT privacy FROM borrowers WHERE borrowers.borrowernumber=old_issues.borrowernumber) <> 0";
3197
       $query .= " AND (SELECT privacy FROM borrowers WHERE borrowers.borrowernumber=old_issues.borrowernumber) <> 0";
3197
    }
3198
    }
3199
3200
    if ( C4::Context->preference('StoreLastBorrower') ) {
3201
        $query .= " AND issue_id IN ( SELECT issue_id FROM old_issues GROUP BY itemnumber ORDER BY issue_id DESC ) ";
3202
    }
3203
3198
    my $sth = $dbh->prepare($query);
3204
    my $sth = $dbh->prepare($query);
3199
    $sth->execute(@bind_params);
3205
    $sth->execute(@bind_params);
3200
    my $anonymisation_err = $dbh->err;
3206
    my $anonymisation_err = $dbh->err;
3201
- 

Return to bug 9011