Bugzilla – Attachment 120721 Details for
Bug 17787
Hidden items included in count of search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17787: Hidden items included in count of search results
Bug-17787-Hidden-items-included-in-count-of-search.patch (text/plain), 1.45 KB, created by
Gérard Simon Voyer
on 2021-05-07 19:59:35 UTC
(
hide
)
Description:
Bug 17787: Hidden items included in count of search results
Filename:
MIME Type:
Creator:
Gérard Simon Voyer
Created:
2021-05-07 19:59:35 UTC
Size:
1.45 KB
patch
obsolete
>From 0266174c96b8b1b26b32b432dc63b585ab86d330 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?G=C3=A9rard=20Simon=20Voyer?= <simon.voyer@collecto.ca> >Date: Fri, 7 May 2021 19:51:51 +0000 >Subject: [PATCH] Bug 17787: Hidden items included in count of search results > >opac-search.pl does not consider items hidden by OpacHiddenItems in the search count. >This attachment aims at fixing the count for visual harmony, since the bug lives on but >is only reported in cases where the results count is greater than the value of results_per_page. >--- > opac/opac-search.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 26ec1cca9e..f4950bb001 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -692,6 +692,7 @@ for (my $i=0;$i<@servers;$i++) { > $art_req_itypes = Koha::CirculationRules->guess_article_requestable_itemtypes({ $patron ? ( categorycode => $patron->categorycode ) : () }); > } > >+ my $results_count = scalar @newresults; > foreach my $res (@newresults) { > > # must define a value for size if not present in DB >@@ -754,7 +755,9 @@ for (my $i=0;$i<@servers;$i++) { > } > > if ($results_hashref->{$server}->{"hits"}){ >- $total = $total + $hits; >+ if ($hits > $results_per_page) { >+ $total = $total + $hits; >+ } else { $total = $results_count } > } > > # Opac search history >-- >2.11.0
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 17787
:
79234
|
120721
|
135460