[Koha-patches] [PATCH 69/92] Bug 1807 - Commenting out flawed nested queries implementation, now users can search using ()

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Tue Dec 22 01:21:02 CET 2009


From: Chris Cormack <chris at bigballofwax.co.nz>

---
 C4/Search.pm |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index ff1a69f..f024792 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -852,13 +852,15 @@ sub buildQuery {
 
     # pass nested queries directly
     # FIXME: need better handling of some of these variables in this case
-    if ( $query =~ /(\(|\))/ ) {
-        return (
-            undef,              $query, $simple_query, $query_cgi,
-            $query,             $limit, $limit_cgi,    $limit_desc,
-            $stopwords_removed, 'ccl'
-        );
-    }
+    # Nested queries aren't handled well and this implementation is flawed and causes users to be
+    # unable to search for anything containing () commenting out, will be rewritten for 3.4.0
+#    if ( $query =~ /(\(|\))/ ) {
+#        return (
+#            undef,              $query, $simple_query, $query_cgi,
+#            $query,             $limit, $limit_cgi,    $limit_desc,
+#            $stopwords_removed, 'ccl'
+#        );
+#    }
 
 # Form-based queries are non-nested and fixed depth, so we can easily modify the incoming
 # query operands and indexes and add stemming, truncation, field weighting, etc.
-- 
1.6.3.3




More information about the Koha-patches mailing list