use 'OR' only for genres

This commit is contained in:
Gilles Crettenand
2015-06-18 11:28:14 +02:00
parent c872c7b9bc
commit 5ebe300c28
2 changed files with 15 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ use BSR\Lib\WebService;
class NetBiblio extends WebService
{
/** @var string $version version number */
public static $version = '1.0.5';
public static $version = '1.0.6';
private $login = '';
private $client = 'website';
@@ -688,7 +688,8 @@ class NetBiblio extends WebService
(is_array($queryArray[$q]) && count($queryArray[$q]) > 0)
)) {
if(is_array($queryArray[$q])) {
$bs->addOrQuery($queryArray[$q], $q);
// Genres cannot overlap, so we use 'OR', otherwise use 'AND'
$bs->addCompoundQuery($queryArray[$q], $q, $q == 'genreCode' ? 'OR' : 'AND');
} else {
$bs->addQuery($queryArray[$q], $q);
}