Bugzilla – Attachment 11848 Details for
Bug 4491
Cleaning some weird code in *search.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4491: FIX buildQuery if called with an empty limit
Bug-4491-FIX-buildQuery-if-called-with-an-empty-li.patch (text/plain), 1.50 KB, created by
Jared Camins-Esakov
on 2012-08-27 17:06:14 UTC
(
hide
)
Description:
Bug 4491: FIX buildQuery if called with an empty limit
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-08-27 17:06:14 UTC
Size:
1.50 KB
patch
obsolete
>From 976be5817eebd68ab4090fa8a0c09e1fb4c87681 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 22 Aug 2012 14:12:09 +0200 >Subject: [PATCH] Bug 4491: FIX buildQuery if called with an empty limit >Content-Type: text/plain; charset="UTF-8" > >if @limit=('') buildQuery failed > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >All searches that I tried (keyword, indexed, CCL, with limits, without, >etc.) worked fine. There are warnings about uninitialized variables in >the OPAC, but they exist on master as well and therefore should not >block these patches. >--- > C4/Search.pm | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index fd81610..77b36a1 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1100,7 +1100,8 @@ sub buildQuery { > my $q=$'; > # This is needed otherwise ccl= and &limit won't work together, and > # this happens when selecting a subject on the opac-detail page >- if (@limits) { >+ @limits = grep {!/^$/} @limits; >+ if ( @limits ) { > $q .= ' and '.join(' and ', @limits); > } > return ( undef, $q, $q, "q=ccl=$q", $q, '', '', '', '', 'ccl' ); >@@ -1317,6 +1318,7 @@ sub buildQuery { > my %group_OR_limits; > my $availability_limit; > foreach my $this_limit (@limits) { >+ next unless $this_limit; > if ( $this_limit =~ /available/ ) { > # > ## 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) >-- >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 4491
:
11110
|
11740
|
11847
| 11848