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

(-)a/Koha/QueryParser/Driver/PQF/query_plan.pm (-2 / +2 lines)
Lines 50-56 sub target_syntax { Link Here
50
            $pqf .= $node_pqf;
50
            $pqf .= $node_pqf;
51
        }
51
        }
52
    }
52
    }
53
    $pqf = ($self->joiner eq '|' ? ' @or ' : ' @and ') x ($node_count - 1) . $pqf;
53
    $pqf = ($self->joiner eq '|' ? ' @or ' : ' @and ') x ($node_count - 1) . $pqf if $node_count > 1;
54
    $node_count = ($node_count ? '1' : '0');
54
    $node_count = ($node_count ? '1' : '0');
55
    for my $node ( @{$self->filters} ) {
55
    for my $node ( @{$self->filters} ) {
56
        if (ref($node)) {
56
        if (ref($node)) {
Lines 59-65 sub target_syntax { Link Here
59
            $pqf .= $node_pqf;
59
            $pqf .= $node_pqf;
60
        }
60
        }
61
    }
61
    }
62
    $pqf = ($self->joiner eq '|' ? ' @or ' : ' @and ') x ($node_count - 1) . $pqf;
62
    $pqf = ($self->joiner eq '|' ? ' @or ' : ' @and ') x ($node_count - 1) . $pqf if $node_count > 1;
63
    foreach my $modifier ( @{$self->modifiers} ) {
63
    foreach my $modifier ( @{$self->modifiers} ) {
64
        my $modifierpqf = $modifier->target_syntax($server, $self);
64
        my $modifierpqf = $modifier->target_syntax($server, $self);
65
        $pqf = $modifierpqf . ' ' . $pqf if $modifierpqf;
65
        $pqf = $modifierpqf . ' ' . $pqf if $modifierpqf;
(-)a/Koha/QueryParser/Driver/PQF/query_plan/node.pm (-2 / +1 lines)
Lines 99-105 sub target_syntax { Link Here
99
            }
99
            }
100
        }
100
        }
101
    }
101
    }
102
    $pqf = (OpenILS::QueryParser::_util::default_joiner eq '|' ? ' @or ' : ' @and ') x ($atom_count - 1) . $pqf;
102
    $pqf = (OpenILS::QueryParser::_util::default_joiner eq '|' ? ' @or ' : ' @and ') x ($atom_count - 1) . $pqf if $atom_count > 1;
103
    return ($self->negate ? '@not @attr 1=_ALLRECORDS @attr 2=103 "" ' : '') . $pqf;
103
    return ($self->negate ? '@not @attr 1=_ALLRECORDS @attr 2=103 "" ' : '') . $pqf;
104
}
104
}
105
105
106
- 

Return to bug 24367