Lines 1322-1327
sub buildQuery {
Link Here
|
1322 |
} |
1322 |
} |
1323 |
$q .= ' and '.join(' and ', @limits) if @limits; |
1323 |
$q .= ' and '.join(' and ', @limits) if @limits; |
1324 |
} |
1324 |
} |
|
|
1325 |
#TODO withoutitems limit |
1325 |
return ( undef, $q, $q, "q=ccl=".uri_escape_utf8($q), $original_q, '', '', '', 'ccl' ); |
1326 |
return ( undef, $q, $q, "q=ccl=".uri_escape_utf8($q), $original_q, '', '', '', 'ccl' ); |
1326 |
} |
1327 |
} |
1327 |
if ( $query =~ /^cql=/ ) { |
1328 |
if ( $query =~ /^cql=/ ) { |
Lines 1515-1520
sub buildQuery {
Link Here
|
1515 |
# add limits |
1516 |
# add limits |
1516 |
my %group_OR_limits; |
1517 |
my %group_OR_limits; |
1517 |
my $availability_limit; |
1518 |
my $availability_limit; |
|
|
1519 |
my $withoutitems_limit; |
1518 |
foreach my $this_limit (@limits) { |
1520 |
foreach my $this_limit (@limits) { |
1519 |
next unless $this_limit; |
1521 |
next unless $this_limit; |
1520 |
if ( $this_limit =~ /available/ ) { |
1522 |
if ( $this_limit =~ /available/ ) { |
Lines 1527-1532
sub buildQuery {
Link Here
|
1527 |
$limit_cgi .= "&limit=available"; |
1529 |
$limit_cgi .= "&limit=available"; |
1528 |
$limit_desc .= ""; |
1530 |
$limit_desc .= ""; |
1529 |
} |
1531 |
} |
|
|
1532 |
elsif ( $this_limit =~ /withoutitems/ ) { |
1533 |
$withoutitems_limit = "( allrecords,AlwaysMatches='' not(homebranch,AlwaysMatches='') )"; |
1534 |
$limit_cgi .= "&limit=withoutitems"; |
1535 |
$limit_desc .= ""; |
1536 |
} |
1530 |
|
1537 |
|
1531 |
# group_OR_limits, prefixed by mc- |
1538 |
# group_OR_limits, prefixed by mc- |
1532 |
# OR every member of the group |
1539 |
# OR every member of the group |
Lines 1571-1576
sub buildQuery {
Link Here
|
1571 |
$limit .= " and " if ( $query || $limit ); |
1578 |
$limit .= " and " if ( $query || $limit ); |
1572 |
$limit .= "($availability_limit)"; |
1579 |
$limit .= "($availability_limit)"; |
1573 |
} |
1580 |
} |
|
|
1581 |
if ($withoutitems_limit) { |
1582 |
$limit .= " and " if ( $query || $limit ); |
1583 |
$limit .= "($withoutitems_limit)"; |
1584 |
} |
1574 |
|
1585 |
|
1575 |
# Normalize the query and limit strings |
1586 |
# Normalize the query and limit strings |
1576 |
# This is flawed , means we can't search anything with : in it |
1587 |
# This is flawed , means we can't search anything with : in it |