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

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

Return to bug 9011