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

(-)a/opac/opac-privacy.pl (-7 / +3 lines)
Lines 40-52 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
40
    }
40
    }
41
);
41
);
42
42
43
my $patron = Koha::Patrons->find( $borrowernumber );
44
45
my $op                         = $query->param("op");
43
my $op                         = $query->param("op");
46
my $privacy                    = $query->param("privacy");
44
my $privacy                    = $query->param("privacy");
47
my $privacy_guarantor_checkouts = $query->param("privacy_guarantor_checkouts");
45
my $privacy_guarantor_checkouts = $query->param("privacy_guarantor_checkouts");
48
my $privacy_guarantor_fines     = $query->param("privacy_guarantor_fines");
46
my $privacy_guarantor_fines     = $query->param("privacy_guarantor_fines");
49
47
48
my $patron = Koha::Patrons->find( $borrowernumber );;
49
50
if ( $op eq "update_privacy" ) {
50
if ( $op eq "update_privacy" ) {
51
    if ( $patron ) {
51
    if ( $patron ) {
52
        $patron->set({
52
        $patron->set({
Lines 69-78 elsif ( $op eq "delete_record" ) { Link Here
69
    if ( $all or $checkouts ) {
69
    if ( $all or $checkouts ) {
70
70
71
        # delete all reading records for items returned
71
        # delete all reading records for items returned
72
        my $rows = eval {
72
        my $rows = eval { $patron->old_checkouts->anonymize + 0 };
73
            Koha::Patrons->search( { 'me.borrowernumber' => $borrowernumber } )
74
              ->anonymise_issue_history;
75
        };
76
73
77
        $template->param(
74
        $template->param(
78
            (
75
            (
79
- 

Return to bug 29483