From 9feb5fa1e87f86df2b900f6beefea1d4910098d0 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=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc VĂ©ron --- catalogue/itemsearch.pl | 1 + koha-tmpl/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 5f20dd3..b069128 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -252,6 +252,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 35e020f..4bc2add 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.1.4