Lines 1345-1350
sub _SearchItems_build_where_fragment {
Link Here
|
1345 |
} |
1345 |
} |
1346 |
$column = "ExtractValue($sqlfield, '$xpath')"; |
1346 |
$column = "ExtractValue($sqlfield, '$xpath')"; |
1347 |
} |
1347 |
} |
|
|
1348 |
} |
1349 |
elsif ($field eq 'isbn') { |
1350 |
if ( C4::Context->preference("SearchWithISBNVariations") and $query ) { |
1351 |
my @isbns = C4::Koha::GetVariationsOfISBN( $query ); |
1352 |
$query = []; |
1353 |
push @$query, @isbns; |
1354 |
} |
1355 |
$column = $field; |
1356 |
} |
1357 |
elsif ($field eq 'issn') { |
1358 |
if ( C4::Context->preference("SearchWithISSNVariations") and $query ) { |
1359 |
my @issns = C4::Koha::GetVariationsOfISSN( $query ); |
1360 |
$query = []; |
1361 |
push @$query, @issns; |
1362 |
} |
1363 |
$column = $field; |
1348 |
} else { |
1364 |
} else { |
1349 |
$column = $field; |
1365 |
$column = $field; |
1350 |
} |
1366 |
} |
Lines 1354-1368
sub _SearchItems_build_where_fragment {
Link Here
|
1354 |
} |
1370 |
} |
1355 |
|
1371 |
|
1356 |
if (ref $query eq 'ARRAY') { |
1372 |
if (ref $query eq 'ARRAY') { |
1357 |
if ($op eq '=') { |
1373 |
if ($op eq 'like') { |
1358 |
$op = 'IN'; |
1374 |
$where_fragment = { |
1359 |
} elsif ($op eq '!=') { |
1375 |
str => "($column LIKE " . join (" OR $column LIKE ", ('?') x @$query ) . ")", |
1360 |
$op = 'NOT IN'; |
1376 |
args => $query, |
|
|
1377 |
}; |
1378 |
} |
1379 |
else { |
1380 |
if ($op eq '=') { |
1381 |
$op = 'IN'; |
1382 |
} elsif ($op eq '!=') { |
1383 |
$op = 'NOT IN'; |
1384 |
} |
1385 |
$where_fragment = { |
1386 |
str => "$column $op (" . join (',', ('?') x @$query) . ")", |
1387 |
args => $query, |
1388 |
}; |
1361 |
} |
1389 |
} |
1362 |
$where_fragment = { |
|
|
1363 |
str => "$column $op (" . join (',', ('?') x @$query) . ")", |
1364 |
args => $query, |
1365 |
}; |
1366 |
} elsif ( $op eq 'is' ) { |
1390 |
} elsif ( $op eq 'is' ) { |
1367 |
$where_fragment = { |
1391 |
$where_fragment = { |
1368 |
str => "$column $op $query", |
1392 |
str => "$column $op $query", |
1369 |
- |
|
|