From aba369d28710e5153fbe03b6a8981a12cf684d4a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 17 Apr 2015 09:51:03 -0400 Subject: [PATCH] Bug 13022 [QA Followup] - Allow the pref to be unset for unlimited item status checks MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Druart Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com (cherry picked from commit 7ab9d7d91d543cd2e6e82de6b536ee7ce1cb0508) Signed-off-by: Julian Maurice (cherry picked from commit 6e0a32a2633a244322a19d0e7494dc2151a02e8f) Signed-off-by: Frédéric Demians --- C4/Search.pm | 3 ++- .../prog/en/modules/admin/preferences/searching.pref | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index f1e6cd47f5..e1e7c64cef 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2144,7 +2144,8 @@ sub searchResults { || $item->{itemlost} || $item->{damaged} || $item->{notforloan} - || $items_count > C4::Context->preference('MaxSearchResultsItemsPerRecordStatusCheck') ) { + || ( C4::Context->preference('MaxSearchResultsItemsPerRecordStatusCheck') + && $items_count > C4::Context->preference('MaxSearchResultsItemsPerRecordStatusCheck') ) ) { # A couple heuristics to limit how many times # we query the database for item transfer information, sacrificing diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index a7c39bf710..c5c00a97a9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -152,7 +152,9 @@ Searching: - For records with many items, only check the availability status for the first - pref: MaxSearchResultsItemsPerRecordStatusCheck class: integer - - items. If a record has more than this number of items, they availability statuses may be incorrect in the search results, but will be correct in the record details. + - items. + -
If a record has more than this number of items, they availability statuses may be incorrect in the search results, but will be correct in the record details. + -
Leave empty for no limit on the number of items for which to check the status. - - By default, sort search results in the OPAC by - pref: OPACdefaultSortField -- 2.39.5