Bug 9239 QA-follow-up: quiet warnings and fix problem with limits
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 7 Mar 2013 11:50:10 +0000 (06:50 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 17 Mar 2013 01:32:33 +0000 (21:32 -0400)
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Search.pm
Koha/QueryParser/Driver/PQF/query_plan/node.pm
opac/opac-search.pl

index 8147e52..6772ce2 100644 (file)
@@ -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)
     {
index e93bb4b..7d694cd 100644 (file)
@@ -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++;
index 4744ac6..6be3333 100755 (executable)
@@ -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');