]> git.koha-community.org Git - koha.git/commit
Bug 25872: Fix scoping of $limits
authorNick Clemens <nick@bywatersolutions.com>
Thu, 13 Aug 2020 12:56:33 +0000 (12:56 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 3 Sep 2020 15:33:26 +0000 (15:33 +0000)
commit48507259b413c86a216a127f2ba1457edb3e83d4
treeebce5ba7d168aa6399254b97632b0f5080f9c9c7
parent7d035b39d20353a004c0f24ce2e2e0d24286e474
Bug 25872: Fix scoping of $limits

The code in build_query_compat contained a 'my' in the assigning of limits for the search in a conditional

This meant the limits were being set correctly during the conditional, but we blanked when passed to the rest
of the code. The effect was that the searches worked, however, the template params to repeat the search were
incomplete.

Removing the my ensures the same limits are applied during search and on re-sorting

To test:
1 - Enable Elasticsearch
2 - On OPAC perform advanced search, selecting only an itype, ccode, or LOC limit
3 - Attempt to sort results
4 - You are returned to Advanced search
5 - Apply patch
6 - Repeat
7 - It sorts!

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 43dc505a52a2679e40a22ff610c91552cd8f2fd1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm