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

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

Return to bug 9011