Lines 28-33
use C4::Context;
Link Here
|
28 |
use C4::Output; |
28 |
use C4::Output; |
29 |
use C4::Auth; |
29 |
use C4::Auth; |
30 |
use C4::Members; |
30 |
use C4::Members; |
|
|
31 |
use C4::Suggestions qw( SearchSuggestion ); |
31 |
use Koha::Patrons; |
32 |
use Koha::Patrons; |
32 |
use Koha::Token; |
33 |
use Koha::Token; |
33 |
use Koha::Patron::Categories; |
34 |
use Koha::Patron::Categories; |
Lines 102-107
if ( $op eq 'delete_confirm' or $countissues > 0 or $debits or $is_guarantor ) {
Link Here
|
102 |
op => 'delete_confirm', |
103 |
op => 'delete_confirm', |
103 |
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }), |
104 |
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }), |
104 |
); |
105 |
); |
|
|
106 |
|
107 |
# Add warning if patron has pending suggestions |
108 |
$template->param( |
109 |
pending_suggestions => scalar @{ |
110 |
C4::Suggestions::SearchSuggestion( |
111 |
{ suggestedby => $member, STATUS => 'ASKED' } |
112 |
) |
113 |
} |
114 |
); |
105 |
} elsif ( $op eq 'delete_confirmed' ) { |
115 |
} elsif ( $op eq 'delete_confirmed' ) { |
106 |
output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' ) |
116 |
output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' ) |
107 |
unless Koha::Token->new->check_csrf( { |
117 |
unless Koha::Token->new->check_csrf( { |
108 |
- |
|
|