Bugzilla – Attachment 144450 Details for
Bug 32401
x-koha-query cannot contain non-ISO-8859-1 values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32401: Remove x-koha-query support
Bug-32401-Remove-x-koha-query-support.patch (text/plain), 5.37 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-12-06 14:22:42 UTC
(
hide
)
Description:
Bug 32401: Remove x-koha-query support
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-12-06 14:22:42 UTC
Size:
5.37 KB
patch
obsolete
>From 9798a34adfde3c1a9d602a4e4fe96105036f688a Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 6 Dec 2022 11:19:31 -0300 >Subject: [PATCH] Bug 32401: Remove x-koha-query support > >HTTP headers can only contain ASCII characters, and it is thus >impractical to use a header for passing DB queries that could contain >non-ascii characters. > >We don't need it, and should be removed. > >This patch removes traces from the datatables.js files and also from >detail.tt, which had it set to false anyway. > >See bug 32406 and bug 32409 for the cases in which it was being used, >and problematic. >--- > .../prog/en/modules/catalogue/detail.tt | 1 - > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 12 ++---------- > koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 12 ++---------- > 3 files changed, 4 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index e59ed096b99..d9c2b7836f6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -1651,7 +1651,6 @@ Note that permanent location is a code, and location may be an authval. > "ajax": { > "url": bundle_table_url > }, >- "header_filter": false, > "embed": [ > "biblio", > "return_claim.patron" >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 0fbb9b625cb..ef703578f46 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -553,10 +553,6 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { > if(options.embed) { > xhr.setRequestHeader('x-koha-embed', Array.isArray(options.embed)?options.embed.join(','):options.embed); > } >- if(options.header_filter && options.query_parameters) { >- xhr.setRequestHeader('x-koha-query', options.query_parameters); >- delete options.query_parameters; >- } > }, > 'dataFilter': function(data, type) { > var json = {data: JSON.parse(data)}; >@@ -666,12 +662,8 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { > > if(query_parameters.length) { > query_parameters = JSON.stringify(query_parameters.length === 1?query_parameters[0]:{"-and": query_parameters}); >- if(options.header_filter) { >- options.query_parameters = query_parameters; >- } else { >- dataSet.q = query_parameters; >- delete options.query_parameters; >- } >+ dataSet.q = query_parameters; >+ delete options.query_parameters; > } else { > delete options.query_parameters; > } >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >index ea0f3773d2b..566ee9869bc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >@@ -141,10 +141,6 @@ $.fn.dataTable.ext.buttons.clearFilter = { > if(options.embed) { > xhr.setRequestHeader('x-koha-embed', Array.isArray(options.embed)?options.embed.join(','):options.embed); > } >- if(options.header_filter && options.query_parameters) { >- xhr.setRequestHeader('x-koha-query', options.query_parameters); >- delete options.query_parameters; >- } > }, > 'dataFilter': function(data, type) { > var json = {data: JSON.parse(data)}; >@@ -180,12 +176,8 @@ $.fn.dataTable.ext.buttons.clearFilter = { > > if(query_parameters.length) { > query_parameters = JSON.stringify(query_parameters.length === 1?query_parameters[0]:query_parameters); >- if(options.header_filter) { >- options.query_parameters = query_parameters; >- } else { >- dataSet.q = query_parameters; >- delete options.query_parameters; >- } >+ dataSet.q = query_parameters; >+ delete options.query_parameters; > } else { > delete options.query_parameters; > } >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32401
:
144450
|
144462
|
145926