Bugzilla – Attachment 26889 Details for
Bug 11489
OPAC search results in 404 error when the only search result is supressed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11489 - OPAC search results in 404 error when the only search result is supressed
PASSED-QA-Bug-11489---OPAC-search-results-in-404-e.patch (text/plain), 1.76 KB, created by
Katrin Fischer
on 2014-04-07 22:32:35 UTC
(
hide
)
Description:
[PASSED QA] Bug 11489 - OPAC search results in 404 error when the only search result is supressed
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-04-07 22:32:35 UTC
Size:
1.76 KB
patch
obsolete
>From 7c910d9a1dcd7a7516e10ce5e88a61c13c447a46 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 7 Jan 2014 10:19:37 -0700 >Subject: [PATCH] [PASSED QA] Bug 11489 - OPAC search results in 404 error when > the only search result is supressed > >If hidelostitems is enabled, and the result of an opac search is a single lost item, >then the opac will display a 404 error, rather than a "no results" screen. > >Test Plan: >1) Catalog a record/item such that it is the only result for some search > e.g. Give it the title 'zxcvb' >2) Enable hidelostitems >3) Mark this item as lost >4) Perform an OPAC search that should result in a redirect to this record >5) Notice you a redirected to a 404 error >6) Apply this patch >7) Repeat step 4 >8) Note you new get a "No results found!" page instead > >Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> >Signed-off-by: Michot <nmichot@voila.fr> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > opac/opac-search.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 617d67e..a8eb7d5 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -556,6 +556,7 @@ for (my $i=0;$i<@servers;$i++) { > @newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan, > $results_hashref->{$server}->{"RECORDS"}); > } >+ $hits = 0 unless @newresults; > > foreach my $res (@newresults) { > >@@ -610,7 +611,7 @@ for (my $i=0;$i<@servers;$i++) { > } > > if ($results_hashref->{$server}->{"hits"}){ >- $total = $total + $results_hashref->{$server}->{"hits"}; >+ $total = $total + $hits; > } > > # Opac search history >-- >1.8.3.2
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 11489
:
23989
|
23990
|
24291
|
24292
|
24294
|
24496
|
24497
|
24733
|
26061
|
26062
| 26889 |
26890