Index: openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl,v diff -u -r1.32 -r1.33 --- openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 29 Jun 2015 18:46:49 -0000 1.32 +++ openacs-4/packages/tsearch2-driver/tcl/tsearch2-driver-procs.tcl 7 Aug 2017 23:48:29 -0000 1.33 @@ -106,19 +106,13 @@ @creation-date 2004-06-05 @param query - @param offset - @param limit - @param user_id - @param df - @param packages list of packages to search for content in. @return - @error } { set packages {} @@ -210,11 +204,9 @@ @creation-date 2004-06-05 @param query - @param txt @return summary containing search query terms - @error } { set query [tsearch2::build_query -query $query] @@ -294,7 +286,7 @@ regsub {([-/@.\d\w\(\)])\s+?([-/@.\d\w\(\)])} $query {\1 \& \2} query } # if a ! is by itself then prepend & - regsub {(\w+?)\s*(!)} $query {\1 \& !} query + regsub -all {(\w+?)\s*(!)} $query {\1 \& !} query # if there is )( then insert an & between them # or if there is )\w or \w( insert an & between them regsub {(\))([\(\w])} $query {\1 \& \2} query @@ -305,10 +297,10 @@ return $query } -ad_proc -public tsearch2::seperate_query_and_operators { +ad_proc -public tsearch2::separate_query_and_operators { -query } { - Seperates special operators from full text query + Separates special operators from full text query @author Dave Bauer (dave@thedesignexperience.org) @creation-date 2004-07-10 @@ -325,7 +317,7 @@ # match quotes set quote_count [regexp -all {\"} $query] # if quotes don't match, just remove all of them - if {[expr {$quote_count % 2}] == 1} { + if {$quote_count % 2 == 1} { regsub -all {\"} $query {} query }