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

(-)a/C4/Circulation.pm (-1 / +6 lines)
Lines 3092-3103 sub AnonymiseIssueHistory { Link Here
3092
    # The anonymisation will fail quietly if AnonymousPatron is not a valid entry
3092
    # The anonymisation will fail quietly if AnonymousPatron is not a valid entry
3093
    my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0;
3093
    my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0;
3094
    my @bind_params = ($anonymouspatron, $date);
3094
    my @bind_params = ($anonymouspatron, $date);
3095
3095
    if (defined $borrowernumber) {
3096
    if (defined $borrowernumber) {
3096
       $query .= " AND borrowernumber = ?";
3097
       $query .= " AND borrowernumber = ?";
3097
       push @bind_params, $borrowernumber;
3098
       push @bind_params, $borrowernumber;
3098
    } else {
3099
    } else {
3099
       $query .= " AND (SELECT privacy FROM borrowers WHERE borrowers.borrowernumber=old_issues.borrowernumber) <> 0";
3100
       $query .= " AND (SELECT privacy FROM borrowers WHERE borrowers.borrowernumber=old_issues.borrowernumber) <> 0";
3100
    }
3101
    }
3102
3103
    if ( C4::Context->preference('StoreLastBorrower') ) {
3104
        $query .= " AND issue_id IN ( SELECT issue_id FROM old_issues GROUP BY itemnumber ORDER BY issue_id DESC ) ";
3105
    }
3106
3101
    my $sth = $dbh->prepare($query);
3107
    my $sth = $dbh->prepare($query);
3102
    $sth->execute(@bind_params);
3108
    $sth->execute(@bind_params);
3103
    my $anonymisation_err = $dbh->err;
3109
    my $anonymisation_err = $dbh->err;
3104
- 

Return to bug 9011