Lines 23-29
use Modern::Perl;
Link Here
|
23 |
use POSIX qw( ceil ); |
23 |
use POSIX qw( ceil ); |
24 |
use CGI qw ( -utf8 ); |
24 |
use CGI qw ( -utf8 ); |
25 |
use CGI::Cookie; # need to check cookies before having CGI parse the POST request |
25 |
use CGI::Cookie; # need to check cookies before having CGI parse the POST request |
26 |
use URI::Escape qw( uri_escape_utf8 ); |
26 |
use URI::Escape qw( uri_escape_utf8 uri_unescape ); |
27 |
use C4::Auth qw( check_cookie_auth get_template_and_user ); |
27 |
use C4::Auth qw( check_cookie_auth get_template_and_user ); |
28 |
use C4::Context; |
28 |
use C4::Context; |
29 |
use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers ); |
29 |
use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers ); |
Lines 58-63
if (is_ajax()) {
Link Here
|
58 |
my $operator = C4::Context->userenv->{'number'}; # must occur AFTER auth |
58 |
my $operator = C4::Context->userenv->{'number'}; # must occur AFTER auth |
59 |
my ($tag, $js_reply); |
59 |
my ($tag, $js_reply); |
60 |
if ($tag = $input->param('test')) { |
60 |
if ($tag = $input->param('test')) { |
|
|
61 |
$tag = uri_unescape($tag); |
61 |
my $check = is_approved($tag); |
62 |
my $check = is_approved($tag); |
62 |
$js_reply = ( $check >= 1 ? 'success' : $check <= -1 ? 'failure' : 'indeterminate' ) . "_test('".uri_escape_utf8($tag)."');\n"; |
63 |
$js_reply = ( $check >= 1 ? 'success' : $check <= -1 ? 'failure' : 'indeterminate' ) . "_test('".uri_escape_utf8($tag)."');\n"; |
63 |
} |
64 |
} |
64 |
- |
|
|