|
Lines 1242-1247
sub buildQuery {
Link Here
|
| 1242 |
} |
1242 |
} |
| 1243 |
$q .= ' and '.join(' and ', @limits) if @limits; |
1243 |
$q .= ' and '.join(' and ', @limits) if @limits; |
| 1244 |
} |
1244 |
} |
|
|
1245 |
#TODO withoutitems limit |
| 1245 |
return ( undef, $q, $q, "q=ccl=".uri_escape_utf8($q), $original_q, '', '', '', 'ccl' ); |
1246 |
return ( undef, $q, $q, "q=ccl=".uri_escape_utf8($q), $original_q, '', '', '', 'ccl' ); |
| 1246 |
} |
1247 |
} |
| 1247 |
if ( $query =~ /^cql=/ ) { |
1248 |
if ( $query =~ /^cql=/ ) { |
|
Lines 1441-1446
sub buildQuery {
Link Here
|
| 1441 |
# add limits |
1442 |
# add limits |
| 1442 |
my %group_OR_limits; |
1443 |
my %group_OR_limits; |
| 1443 |
my $availability_limit; |
1444 |
my $availability_limit; |
|
|
1445 |
my $withoutitems_limit; |
| 1444 |
foreach my $this_limit (@limits) { |
1446 |
foreach my $this_limit (@limits) { |
| 1445 |
next unless $this_limit; |
1447 |
next unless $this_limit; |
| 1446 |
if ( $this_limit =~ /available/ ) { |
1448 |
if ( $this_limit =~ /available/ ) { |
|
Lines 1453-1458
sub buildQuery {
Link Here
|
| 1453 |
$limit_cgi .= "&limit=available"; |
1455 |
$limit_cgi .= "&limit=available"; |
| 1454 |
$limit_desc .= ""; |
1456 |
$limit_desc .= ""; |
| 1455 |
} |
1457 |
} |
|
|
1458 |
elsif ( $this_limit =~ /withoutitems/ ) { |
| 1459 |
$withoutitems_limit = "( allrecords,AlwaysMatches='' not(homebranch,AlwaysMatches='') )"; |
| 1460 |
$limit_cgi .= "&limit=withoutitems"; |
| 1461 |
$limit_desc .= ""; |
| 1462 |
} |
| 1456 |
|
1463 |
|
| 1457 |
# group_OR_limits, prefixed by mc- |
1464 |
# group_OR_limits, prefixed by mc- |
| 1458 |
# OR every member of the group |
1465 |
# OR every member of the group |
|
Lines 1497-1502
sub buildQuery {
Link Here
|
| 1497 |
$limit .= " and " if ( $query || $limit ); |
1504 |
$limit .= " and " if ( $query || $limit ); |
| 1498 |
$limit .= "($availability_limit)"; |
1505 |
$limit .= "($availability_limit)"; |
| 1499 |
} |
1506 |
} |
|
|
1507 |
if ($withoutitems_limit) { |
| 1508 |
$limit .= " and " if ( $query || $limit ); |
| 1509 |
$limit .= "($withoutitems_limit)"; |
| 1510 |
} |
| 1500 |
|
1511 |
|
| 1501 |
# Normalize the query and limit strings |
1512 |
# Normalize the query and limit strings |
| 1502 |
# This is flawed , means we can't search anything with : in it |
1513 |
# This is flawed , means we can't search anything with : in it |