View | Details | Raw Unified | Return to bug 17278
Collapse All | Expand All

(-)a/C4/Search.pm (-1 / +4 lines)
Lines 1475-1480 sub buildQuery { Link Here
1475
        # this happens when selecting a subject on the opac-detail page
1475
        # this happens when selecting a subject on the opac-detail page
1476
        @limits = grep {!/^$/} @limits;
1476
        @limits = grep {!/^$/} @limits;
1477
        my $original_q = $q; # without available part
1477
        my $original_q = $q; # without available part
1478
        unless ( grep { /^available$/ } @limits ) {
1479
            $q =~ s| and \( \( allrecords,AlwaysMatches:'' not onloan,AlwaysMatches:''\) and \(lost,st-numeric=0\) \)||;
1480
            $original_q = $q;
1481
        }
1478
        if ( @limits ) {
1482
        if ( @limits ) {
1479
            if ( grep { /^available$/ } @limits ) {
1483
            if ( grep { /^available$/ } @limits ) {
1480
                $q .= q| and ( ( allrecords,AlwaysMatches:'' not onloan,AlwaysMatches:'') and (lost,st-numeric=0) )|;
1484
                $q .= q| and ( ( allrecords,AlwaysMatches:'' not onloan,AlwaysMatches:'') and (lost,st-numeric=0) )|;
1481
- 

Return to bug 17278