Skip to content

Commit

Permalink
Merge pull request #473 from dlbptfs/PT44086709
Browse files Browse the repository at this point in the history
[#44086709] Reading history retention - preference in patron record not ...
  • Loading branch information
ctfliblime committed Jun 25, 2013
2 parents 421a82f + 859e0c5 commit 5ca81a9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/C4/Circulation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1654,12 +1654,6 @@ sub AddReturn {
$messages->{'wthdrawn'} = 1;
$doreturn = 0;
}
if ( C4::Context->preference('AllowReadingHistoryAnonymizing')
&& !C4::Context->preference('KeepPreviousBorrower')
&& $borrower->{'disable_reading_history'} )
{
AnonymiseIssueHistory( '', $borrower->{'borrowernumber'} );
}

# Set items.otherstatus back to NULL on check in regardless of whether the
# item was actually checked out.
Expand Down Expand Up @@ -1696,6 +1690,15 @@ sub AddReturn {
}
}

# Needed to move this down below _MarkIssueReturned since most recent
# return was still in the issues and not the old_issues table.
if ( C4::Context->preference('AllowReadingHistoryAnonymizing')
&& !C4::Context->preference('KeepPreviousBorrower')
&& $borrower->{'disable_reading_history'} )
{
AnonymiseIssueHistory( '', $borrower->{'borrowernumber'} );
}

# the holdingbranch is updated if the document is returned to another location.
# this is always done regardless of whether the item was on loan or not
if ($item->{'holdingbranch'} ne $branch) {
Expand Down

0 comments on commit 5ca81a9

Please sign in to comment.