Lines 30-36
use Koha::Illrequests;
Link Here
|
30 |
use Koha::Illrequest::Workflow::Availability; |
30 |
use Koha::Illrequest::Workflow::Availability; |
31 |
use Koha::Illrequest::Workflow::TypeDisclaimer; |
31 |
use Koha::Illrequest::Workflow::TypeDisclaimer; |
32 |
use Koha::Libraries; |
32 |
use Koha::Libraries; |
33 |
use Koha::Token; |
|
|
34 |
|
33 |
|
35 |
use Try::Tiny qw( catch try ); |
34 |
use Try::Tiny qw( catch try ); |
36 |
use URI::Escape qw( uri_escape_utf8 ); |
35 |
use URI::Escape qw( uri_escape_utf8 ); |
Lines 373-382
if ( $backends_available ) {
Link Here
|
373 |
prefilters => join("&", @tpl_arr) |
372 |
prefilters => join("&", @tpl_arr) |
374 |
); |
373 |
); |
375 |
} elsif ( $op eq "save_comment" ) { |
374 |
} elsif ( $op eq "save_comment" ) { |
376 |
die "Wrong CSRF token" unless Koha::Token->new->check_csrf({ |
|
|
377 |
session_id => scalar $cgi->cookie('CGISESSID'), |
378 |
token => scalar $cgi->param('csrf_token'), |
379 |
}); |
380 |
my $comment = Koha::Illcomment->new({ |
375 |
my $comment = Koha::Illcomment->new({ |
381 |
illrequest_id => scalar $params->{illrequest_id}, |
376 |
illrequest_id => scalar $params->{illrequest_id}, |
382 |
borrowernumber => $patronnumber, |
377 |
borrowernumber => $patronnumber, |