Lines 89-94
my $dbh = C4::Context->dbh;
Link Here
|
89 |
my $is_guarantor = $patron->guarantee_relationships->count; |
89 |
my $is_guarantor = $patron->guarantee_relationships->count; |
90 |
my $countholds = $dbh->selectrow_array("SELECT COUNT(*) FROM reserves WHERE borrowernumber=?", undef, $member); |
90 |
my $countholds = $dbh->selectrow_array("SELECT COUNT(*) FROM reserves WHERE borrowernumber=?", undef, $member); |
91 |
|
91 |
|
|
|
92 |
# Add warning if patron has pending suggestions |
93 |
$template->param( |
94 |
pending_suggestions => scalar @{ |
95 |
C4::Suggestions::SearchSuggestion( |
96 |
{ suggestedby => $member, STATUS => 'ASKED' } |
97 |
) |
98 |
} |
99 |
); |
100 |
|
92 |
$template->param( |
101 |
$template->param( |
93 |
patron => $patron, |
102 |
patron => $patron, |
94 |
ItemsOnIssues => $countissues, |
103 |
ItemsOnIssues => $countissues, |
Lines 104-117
if ( $op eq 'delete_confirm' or $countissues > 0 or $debits or $is_guarantor ) {
Link Here
|
104 |
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }), |
113 |
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }), |
105 |
); |
114 |
); |
106 |
|
115 |
|
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 |
); |
115 |
} elsif ( $op eq 'delete_confirmed' ) { |
116 |
} elsif ( $op eq 'delete_confirmed' ) { |
116 |
output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' ) |
117 |
output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' ) |
117 |
unless Koha::Token->new->check_csrf( { |
118 |
unless Koha::Token->new->check_csrf( { |
118 |
- |
|
|