Bugzilla – Attachment 97158 Details for
Bug 24367
With strict enabled, Search.t is too verbose
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24367: Resolve warn Negative repeat count does nothing
Bug-24367-Resolve-warn-Negative-repeat-count-does-.patch (text/plain), 2.53 KB, created by
Marcel de Rooy
on 2020-01-10 08:17:34 UTC
(
hide
)
Description:
Bug 24367: Resolve warn Negative repeat count does nothing
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-01-10 08:17:34 UTC
Size:
2.53 KB
patch
obsolete
>From 45b1484b19b3c21840c9d043e02aed1b909108a0 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 10 Jan 2020 08:07:05 +0000 >Subject: [PATCH] Bug 24367: Resolve warn Negative repeat count does nothing >Content-Type: text/plain; charset=utf-8 > >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. >--- > Koha/QueryParser/Driver/PQF/query_plan.pm | 4 ++-- > Koha/QueryParser/Driver/PQF/query_plan/node.pm | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/QueryParser/Driver/PQF/query_plan.pm b/Koha/QueryParser/Driver/PQF/query_plan.pm >index 19544b8eaf..320410ed2e 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan.pm >@@ -50,7 +50,7 @@ sub target_syntax { > $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)) { >@@ -59,7 +59,7 @@ sub target_syntax { > $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; >diff --git a/Koha/QueryParser/Driver/PQF/query_plan/node.pm b/Koha/QueryParser/Driver/PQF/query_plan/node.pm >index 353d7602d1..9b77ba7ed0 100644 >--- a/Koha/QueryParser/Driver/PQF/query_plan/node.pm >+++ b/Koha/QueryParser/Driver/PQF/query_plan/node.pm >@@ -99,7 +99,7 @@ sub target_syntax { > } > } > } >- $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; > } > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24367
:
96911
|
97096
|
97097
|
97157
| 97158 |
97159
|
97163
|
99113