Bug 18633: Remove remaining use of CGI.param in template
authorJulian Maurice <julian.maurice@biblibre.com>
Mon, 12 Jun 2017 07:18:30 +0000 (09:18 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 10 Jul 2017 20:55:18 +0000 (17:55 -0300)
Signed-off-by: Marc VĂ©ron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

catalogue/itemsearch.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt

index ee8ca66..c48f2f1 100755 (executable)
@@ -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';
     }
 
index 35e020f..4bc2add 100644 (file)
@@ -1,6 +1,5 @@
-[%- USE CGI -%]
 {
-  "sEcho": [% CGI.param('sEcho') %],
+  "sEcho": [% sEcho %],
   "iTotalRecords": [% total_rows %],
   "iTotalDisplayRecords": [% total_rows %],
   "aaData": [