From 2f7bad7039137fe1b3263cbaded1ce68f8daba04 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 12 Jun 2017 09:18:30 +0200 Subject: [PATCH] Bug 18633: Remove remaining use of CGI.param in template MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc Véron Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- catalogue/itemsearch.pl | 1 + .../intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index ee8ca66186..c48f2f1aba 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -253,6 +253,7 @@ if (scalar keys %params > 0) { print "$line\n" unless $line =~ m|^\s*$|; } } elsif ($format eq 'json') { + $template->param(sEcho => scalar $cgi->param('sEcho')); output_with_http_headers $cgi, $cookie, $template->output, 'json'; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt index 35e020f8b1..4bc2add569 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt @@ -1,6 +1,5 @@ -[%- USE CGI -%] { - "sEcho": [% CGI.param('sEcho') %], + "sEcho": [% sEcho %], "iTotalRecords": [% total_rows %], "iTotalDisplayRecords": [% total_rows %], "aaData": [ -- 2.39.5