Negative repeat count does nothing at /usr/share/koha/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
Negative repeat count does nothing at /usr/share/koha/Koha/QueryParser/Driver/PQF/query_plan/node.pm line 102.
I am not sure if this statement actually does what the author intended,
but adding the test on node_count/atom_count removes the warn.
Repeating this change on query_plan.pm line 62.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
$pqf .= $node_pqf;
}
}
- $pqf = ($self->joiner eq '|' ? ' @or ' : ' @and ') x ($node_count - 1) . $pqf;
+ $pqf = ($self->joiner eq '|' ? ' @or ' : ' @and ') x ($node_count - 1) . $pqf if $node_count > 1;
$node_count = ($node_count ? '1' : '0');
for my $node ( @{$self->filters} ) {
if (ref($node)) {
$pqf .= $node_pqf;
}
}
- $pqf = ($self->joiner eq '|' ? ' @or ' : ' @and ') x ($node_count - 1) . $pqf;
+ $pqf = ($self->joiner eq '|' ? ' @or ' : ' @and ') x ($node_count - 1) . $pqf if $node_count > 1;
foreach my $modifier ( @{$self->modifiers} ) {
my $modifierpqf = $modifier->target_syntax($server, $self);
$pqf = $modifierpqf . ' ' . $pqf if $modifierpqf;
}
}
}
- $pqf = (OpenILS::QueryParser::_util::default_joiner eq '|' ? ' @or ' : ' @and ') x ($atom_count - 1) . $pqf;
+ $pqf = (OpenILS::QueryParser::_util::default_joiner eq '|' ? ' @or ' : ' @and ') x ($atom_count - 1) . $pqf if $atom_count > 1;
return ($self->negate ? '@not @attr 1=_ALLRECORDS @attr 2=103 "" ' : '') . $pqf;
}