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

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

Return to bug 9011