Bug 13022 [QA Followup] - Allow the pref to be unset for unlimited item status checks
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 17 Apr 2015 13:51:03 +0000 (09:51 -0400)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Thu, 31 Dec 2015 18:11:21 +0000 (18:11 +0000)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
C4/Search.pm
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref

index a23fe13..f52e0ee 100644 (file)
@@ -2095,7 +2095,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
index a7c39bf..c5c00a9 100644 (file)
@@ -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.
+            - <br/>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.
+            - <br/>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