Bugzilla – Attachment 29523 Details for
Bug 12151
remove remaining uses of the Perl smartmatch operator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12151: Remove uses of smartmatch operator from Koha/Solr/QueryBuilder.pm
PASSED-QA-Bug-12151-Remove-uses-of-smartmatch-oper.patch (text/plain), 1.70 KB, created by
Katrin Fischer
on 2014-07-06 17:41:41 UTC
(
hide
)
Description:
[PASSED QA] Bug 12151: Remove uses of smartmatch operator from Koha/Solr/QueryBuilder.pm
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-07-06 17:41:41 UTC
Size:
1.70 KB
patch
obsolete
>From e6519dc8904c432601b0efeabbd063fb7fc169e4 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Mon, 2 Jun 2014 11:14:11 -0300 >Subject: [PATCH] [PASSED QA] Bug 12151: Remove uses of smartmatch operator > from Koha/Solr/QueryBuilder.pm > >Just that. > >Regards >To+ > >Sponsored-by: Universidad Nacional de Cordoba > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes QA script and tests. >Could only verify by reading the code. >--- > Koha/SearchEngine/Solr/QueryBuilder.pm | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > >diff --git a/Koha/SearchEngine/Solr/QueryBuilder.pm b/Koha/SearchEngine/Solr/QueryBuilder.pm >index b3e75c9..ba5547f 100644 >--- a/Koha/SearchEngine/Solr/QueryBuilder.pm >+++ b/Koha/SearchEngine/Solr/QueryBuilder.pm >@@ -60,16 +60,12 @@ sub build_advanced_query { > # And others > $index_name = @$indexes[$i] if @$indexes[$i]; > my $operator = defined @$operators[$i-1] ? @$operators[$i-1] : 'AND'; >- for ( uc ( $operator ) ) { >- when ('OR'){ >- $q .= BuildTokenString($index_name, $kw, 'OR'); >- } >- when ('NOT'){ >- $q .= BuildTokenString($index_name, $kw, 'NOT'); >- } >- default { >- $q .= BuildTokenString($index_name, $kw, 'AND'); >- } >+ if ( uc ( $operator ) eq 'OR' ) { >+ $q .= BuildTokenString($index_name, $kw, 'OR'); >+ } elsif ( uc ( $operator ) eq 'NOT' ) { >+ $q .= BuildTokenString($index_name, $kw, 'NOT'); >+ } else { >+ $q .= BuildTokenString($index_name, $kw, 'AND'); > } > $i = $i + 1; > } >-- >1.9.1
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 12151
:
28580
|
28581
|
28615
|
28616
|
29013
|
29014
|
29015
|
29016
|
29487
|
29488
|
29489
|
29490
|
29519
|
29520
|
29521
|
29522
| 29523