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.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Tomas Cohen Arazi 2014-06-02 11:14:11 -03:00 committed by Galen Charlton
parent 92b0d001da
commit a67bce36b0
1 changed files with 6 additions and 10 deletions

View File

@ -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;
}