Bugzilla – Attachment 23078 Details for
Bug 9578
Error when search and sort not on relevance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9578 - Error when search and sort not on relevance
0001-Bug-9578-Error-when-search-and-sort-not-on-relevance.patch (text/plain), 1.27 KB, created by
Fridolin Somers
on 2013-11-22 10:11:58 UTC
(
hide
)
Description:
Bug 9578 - Error when search and sort not on relevance
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2013-11-22 10:11:58 UTC
Size:
1.27 KB
patch
obsolete
>From 3ac7bfd560a77aae4a99399e2b68b7a90f879631 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Fri, 22 Nov 2013 11:00:21 +0100 >Subject: [PATCH] Bug 9578 - Error when search and sort not on relevance > >When searching with a sort (means not by relevance) and there is an error in Zebra connexion (server is down or query is wrong), you get the message : > Error : Can't call method "sort" on an undefined value at /home/kohaadmin/src/C4/Search.pm line 405. > >This patch corrects by not performing sort if no results. > >Test plan : >- Set OPACdefaultSortField on something else than relevance >- Perform a simple search with a wrong CCL query. For example : ccl=( and ) >=> You get the messge : No results found ... >--- > C4/Search.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index dd844e3..5dea406 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -422,7 +422,7 @@ sub getRecords { > warn "Ignoring unrecognized sort '$sort' requested" if $sort_by; > } > } >- if ($sort_by && !$scan) { >+ if ( $sort_by && !$scan && $results[$i] ) { > if ( $results[$i]->sort( "yaz", $sort_by ) < 0 ) { > warn "WARNING sort $sort_by failed"; > } >-- >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 9578
:
23078
|
25891
|
26527