Lines 1299-1304
sub _SearchItems_build_where_fragment {
Link Here
|
1299 |
} |
1299 |
} |
1300 |
$column = "ExtractValue($sqlfield, '$xpath')"; |
1300 |
$column = "ExtractValue($sqlfield, '$xpath')"; |
1301 |
} |
1301 |
} |
|
|
1302 |
} |
1303 |
elsif ($field eq 'isbn') { |
1304 |
if ( C4::Context->preference("SearchWithISBNVariations") and $query ) { |
1305 |
my @isbns = C4::Koha::GetVariationsOfISBN( $query ); |
1306 |
$query = []; |
1307 |
push @$query, @isbns; |
1308 |
} |
1309 |
$column = $field; |
1310 |
} |
1311 |
elsif ($field eq 'issn') { |
1312 |
if ( C4::Context->preference("SearchWithISSNVariations") and $query ) { |
1313 |
my @issns = C4::Koha::GetVariationsOfISSN( $query ); |
1314 |
$query = []; |
1315 |
push @$query, @issns; |
1316 |
} |
1317 |
$column = $field; |
1302 |
} else { |
1318 |
} else { |
1303 |
$column = $field; |
1319 |
$column = $field; |
1304 |
} |
1320 |
} |
Lines 1308-1322
sub _SearchItems_build_where_fragment {
Link Here
|
1308 |
} |
1324 |
} |
1309 |
|
1325 |
|
1310 |
if (ref $query eq 'ARRAY') { |
1326 |
if (ref $query eq 'ARRAY') { |
1311 |
if ($op eq '=') { |
1327 |
if ($op eq 'like') { |
1312 |
$op = 'IN'; |
1328 |
$where_fragment = { |
1313 |
} elsif ($op eq '!=') { |
1329 |
str => "($column LIKE " . join (" OR $column LIKE ", ('?') x @$query ) . ")", |
1314 |
$op = 'NOT IN'; |
1330 |
args => $query, |
|
|
1331 |
}; |
1332 |
} |
1333 |
else { |
1334 |
if ($op eq '=') { |
1335 |
$op = 'IN'; |
1336 |
} elsif ($op eq '!=') { |
1337 |
$op = 'NOT IN'; |
1338 |
} |
1339 |
$where_fragment = { |
1340 |
str => "$column $op (" . join (',', ('?') x @$query) . ")", |
1341 |
args => $query, |
1342 |
}; |
1315 |
} |
1343 |
} |
1316 |
$where_fragment = { |
|
|
1317 |
str => "$column $op (" . join (',', ('?') x @$query) . ")", |
1318 |
args => $query, |
1319 |
}; |
1320 |
} elsif ( $op eq 'is' ) { |
1344 |
} elsif ( $op eq 'is' ) { |
1321 |
$where_fragment = { |
1345 |
$where_fragment = { |
1322 |
str => "$column $op $query", |
1346 |
str => "$column $op $query", |
1323 |
- |
|
|