Bugzilla – Attachment 23879 Details for
Bug 11432
404.pl redirect for single, hidden result makes no sense.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11432 - 404.pl redirect for single, hidden result makes no sense.
Bug-11432---404pl-redirect-for-single-hidden-resul.patch (text/plain), 1.89 KB, created by
Biblibre Sandboxes
on 2013-12-31 21:31:12 UTC
(
hide
)
Description:
Bug 11432 - 404.pl redirect for single, hidden result makes no sense.
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2013-12-31 21:31:12 UTC
Size:
1.89 KB
patch
obsolete
>From 9049ccff043480a5fc92cba01c2ba56595a31a50 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 20 Dec 2013 15:44:51 -0500 >Subject: [PATCH] Bug 11432 - 404.pl redirect for single, hidden result makes no sense. > >In bug 10584, when searching for something in OPAC and a single, >hidden result is returned, the default automatic redirect to >the details/MARCdetails/ISBDdetails page triggers a 404.pl >error page. This makes no sense. The correct behaviour would >be to give no results. > >TEST PLAN >--------- >1) OPAC Search for something (I started with stupid) >2) Narrow it to one item (I tweaked it to stupid things) >3) Detail page comes up >4) Staff client -> home -> administration -> > global system preferences -> OPAC >5) OpacHiddenItems add "homebranch: [MAL,DAV,PAP]", > changing MAL, DAV, PAP to the branches for items for this > single biblio. >6) Search for the one item again in OPAC > -- 404.pl is triggered. >4) Apply patch >5) Search again for the one item search > -- No results is triggered (as expected) > >Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> >--- > opac/opac-search.pl | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 8604d0f..4317248 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -655,6 +655,15 @@ for (my $i=0;$i<@servers;$i++) { > } > } > } >+ >+ ## If there's just one result, check if it is hidden >+ ## before trying to redirect. The biblionumber will >+ ## be undefined for a hidden result. >+ if ($total == 1 && ! defined($newresults[0]->{biblionumber})) { >+ $hits = 0; >+ $total = 0; >+ } >+ > ## If there's just one result, redirect to the detail page > if ($total == 1 && $format ne 'rss2' > && $format ne 'opensearchdescription' && $format ne 'atom') { >-- >1.7.2.5
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 11432
:
23738
|
23879
|
24101
|
24102
|
24293