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

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

Return to bug 17278