From 8545522e8734439c29728d782c62486769def1e8 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Thu, 7 Mar 2013 06:50:10 -0500 Subject: [PATCH] Bug 9239 QA-follow-up: quiet warnings and fix problem with limits Signed-off-by: Katrin Fischer Signed-off-by: Jared Camins-Esakov --- C4/Search.pm | 1 + Koha/QueryParser/Driver/PQF/query_plan/node.pm | 1 + opac/opac-search.pl | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index f64b866..e856db8 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1180,6 +1180,7 @@ sub parseQuery { my $QParser; $QParser = C4::Context->queryparser if (C4::Context->preference('UseQueryParser') || $query =~ s/^qp=//); undef $QParser if ($query =~ m/^(ccl=|pqf=|cql=)/ || grep (/\w,\w|\w=\w/, @operands) ); + undef $QParser if (scalar @limits > 0); if ($QParser) { diff --git a/Koha/QueryParser/Driver/PQF/query_plan/node.pm b/Koha/QueryParser/Driver/PQF/query_plan/node.pm index e93bb4b..7d694cd 100644 --- a/Koha/QueryParser/Driver/PQF/query_plan/node.pm +++ b/Koha/QueryParser/Driver/PQF/query_plan/node.pm @@ -68,6 +68,7 @@ sub target_syntax { if ($atom_content) { $pqf .= ' @or ' x (scalar(@fields) - 1); foreach my $attributes (@fields) { + $attributes->{'attr_string'} ||= ''; $pqf .= $attributes->{'attr_string'} . ($attributes->{'4'} ? '' : ' @attr 4=6 ') . $atom_content . ' '; } $atom_count++; diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 4744ac6..6be3333 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -837,7 +837,9 @@ if (C4::Context->preference('GoogleIndicTransliteration')) { $template->param('GoogleIndicTransliteration' => 1); } -$template->{VARS}->{DidYouMean} = C4::Context->preference('OPACdidyoumean') =~ m/enable/; +$template->{VARS}->{DidYouMean} = + ( defined C4::Context->preference('OPACdidyoumean') + && C4::Context->preference('OPACdidyoumean') =~ m/enable/ ); $template->{VARS}->{IDreamBooksReviews} = C4::Context->preference('IDreamBooksReviews'); $template->{VARS}->{IDreamBooksReadometer} = C4::Context->preference('IDreamBooksReadometer'); $template->{VARS}->{IDreamBooksResults} = C4::Context->preference('IDreamBooksResults'); -- 1.7.9.5