]> git.koha-community.org Git - koha.git/commit
Bug 30865: Double-quote Host-item in Koha::Biblio->get_components_query
authorDavid Cook <dcook@prosentient.com.au>
Mon, 30 May 2022 03:31:44 +0000 (03:31 +0000)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Fri, 12 Aug 2022 07:14:16 +0000 (09:14 +0200)
commit7ccea5b6f023c2f0c842c63244d7b9a70e28d781
tree6cbec0e63883e9bdf932398d17431b73a895321b
parentc8167ae70710cdd72c8fdbf48049bc54701bb91b
Bug 30865: Double-quote Host-item in Koha::Biblio->get_components_query

This patch adds double quotes around the term qualified by "Host-item"
in Koha::Biblio->get_components_query().

Without them, reserved charactrs like "=" will cause syntax errors like
"CCL parsing error (10014) Unknown qualifier ZOOM for query:
    Host-item=(MyTitle = Mysubtitle)
    at /usr/share/koha/lib/C4/Search.pm line 245."

Test plan:
0) Don't apply the patch
1) Create biblio with title and subtitle like (MyTitle : MySubtitle)
2) Note the warning "There was an error searching for analytic records,
   please see the logs for details." on the detail page
3) Apply the patch
4) koha-plack --restart kohadev
5) Refresh the detail page
6) Note that the warning message is gone
7) prove t/db_dependent/Koha/Biblio.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fd385d90b8063d5cbdb0e5d1cf76e99b9c58cc84)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2b4eb64563367d2fb0c51b244d0f9a936c4b49ba)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Koha/Biblio.pm
t/db_dependent/Koha/Biblio.t