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

(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js (-1 / +1 lines)
Lines 217-223 $(document).ready(function () { Link Here
217
                    { ...review_ajax_params, type: "GET" },
217
                    { ...review_ajax_params, type: "GET" },
218
                    {
218
                    {
219
                        data: {
219
                        data: {
220
                            tag: $("#test").val(),
220
                            tag: escape_str($("#test").val()),
221
                            op: "test",
221
                            op: "test",
222
                        },
222
                        },
223
                        success: success_test_call, // success_reject
223
                        success: success_test_call, // success_reject
(-)a/tags/review.pl (-3 / +3 lines)
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 60-65 if ( is_ajax() ) { Link Here
60
    my $op  = $input->param('op') || q{};
60
    my $op  = $input->param('op') || q{};
61
    my $tag = $input->param('tag');
61
    my $tag = $input->param('tag');
62
    if ( $op eq 'test' ) {
62
    if ( $op eq 'test' ) {
63
        $tag = uri_unescape($tag);
63
        my $check = is_approved($tag);
64
        my $check = is_approved($tag);
64
        $js_reply =
65
        $js_reply =
65
              ( $check >= 1 ? 'success' : $check <= -1 ? 'failure' : 'indeterminate' )
66
              ( $check >= 1 ? 'success' : $check <= -1 ? 'failure' : 'indeterminate' )
Lines 109-115 if ( $op eq 'cud-approve' ) { Link Here
109
    $template->param(
110
    $template->param(
110
        test_term => $tag,
111
        test_term => $tag,
111
        (
112
        (
112
              $check >= 1  ? 'verdict_ok'
113
              $check >=  1 ? 'verdict_ok'
113
            : $check <= -1 ? 'verdict_rej'
114
            : $check <= -1 ? 'verdict_rej'
114
            :                'verdict_indeterminate'
115
            :                'verdict_indeterminate'
115
        ) => 1,
116
        ) => 1,
116
- 

Return to bug 38969