Lines 1967-1972
sub MarkIssueReturned {
Link Here
|
1967 |
if ( $privacy == 2) { |
1967 |
if ( $privacy == 2) { |
1968 |
# The default of 0 does not work due to foreign key constraints |
1968 |
# The default of 0 does not work due to foreign key constraints |
1969 |
# The anonymisation will fail quietly if AnonymousPatron is not a valid entry |
1969 |
# The anonymisation will fail quietly if AnonymousPatron is not a valid entry |
|
|
1970 |
# FIXME the above is unacceptable - bug 9942 relates |
1970 |
my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0; |
1971 |
my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ? C4::Context->preference('AnonymousPatron') : 0; |
1971 |
my $sth_ano = $dbh->prepare("UPDATE old_issues SET borrowernumber=? |
1972 |
my $sth_ano = $dbh->prepare("UPDATE old_issues SET borrowernumber=? |
1972 |
WHERE borrowernumber = ? |
1973 |
WHERE borrowernumber = ? |
Lines 2821-2827
sub DeleteTransfer {
Link Here
|
2821 |
|
2822 |
|
2822 |
=head2 AnonymiseIssueHistory |
2823 |
=head2 AnonymiseIssueHistory |
2823 |
|
2824 |
|
2824 |
$rows = AnonymiseIssueHistory($date,$borrowernumber) |
2825 |
($rows,$err_history_not_deleted) = AnonymiseIssueHistory($date,$borrowernumber) |
2825 |
|
2826 |
|
2826 |
This function write NULL instead of C<$borrowernumber> given on input arg into the table issues. |
2827 |
This function write NULL instead of C<$borrowernumber> given on input arg into the table issues. |
2827 |
if C<$borrowernumber> is not set, it will delete the issue history for all borrower older than C<$date>. |
2828 |
if C<$borrowernumber> is not set, it will delete the issue history for all borrower older than C<$date>. |
Lines 2829-2835
if C<$borrowernumber> is not set, it will delete the issue history for all borro
Link Here
|
2829 |
If c<$borrowernumber> is set, it will delete issue history for only that borrower, regardless of their opac privacy |
2830 |
If c<$borrowernumber> is set, it will delete issue history for only that borrower, regardless of their opac privacy |
2830 |
setting (force delete). |
2831 |
setting (force delete). |
2831 |
|
2832 |
|
2832 |
return the number of affected rows. |
2833 |
return the number of affected rows and a value that evaluates to true if an error occurred deleting the history. |
2833 |
|
2834 |
|
2834 |
=cut |
2835 |
=cut |
2835 |
|
2836 |
|
Lines 2856-2863
sub AnonymiseIssueHistory {
Link Here
|
2856 |
} |
2857 |
} |
2857 |
my $sth = $dbh->prepare($query); |
2858 |
my $sth = $dbh->prepare($query); |
2858 |
$sth->execute(@bind_params); |
2859 |
$sth->execute(@bind_params); |
|
|
2860 |
my $anonymisation_err = $dbh->err; |
2859 |
my $rows_affected = $sth->rows; ### doublecheck row count return function |
2861 |
my $rows_affected = $sth->rows; ### doublecheck row count return function |
2860 |
return $rows_affected; |
2862 |
return ($rows_affected, $anonymisation_err); |
2861 |
} |
2863 |
} |
2862 |
|
2864 |
|
2863 |
=head2 SendCirculationAlert |
2865 |
=head2 SendCirculationAlert |