summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-08-21 14:15:40 -0700
committerIvan Kohler <ivan@freeside.biz>2012-08-21 14:15:40 -0700
commitfa2326a36a5ce74e8c9dab504c3274688a297c04 (patch)
treebf49bf640e81383ff64fb9df9b12be477d2d6f5a /httemplate/search
parent3c755c5662be8bfe62a646b5e5ea2e2aae3143d8 (diff)
add preference to enable fuzzy searching even on exact matches, RT#18962
Diffstat (limited to 'httemplate/search')
-rwxr-xr-xhttemplate/search/cust_main.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index a81958e20..7c3ad3384 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -468,9 +468,10 @@ if ( $cgi->param('browse')
if ( $cgi->param('search_cust') ) {
$sortby = \*company_sort;
$orderby = "ORDER BY LOWER(company || ' ' || last || ' ' || first )";
- push @cust_main, smart_search( 'search' => scalar($cgi->param('search_cust')),
- 'no_fuzzy_on_exact' => 1, #pref?
- );
+ push @cust_main, smart_search(
+ 'search' => scalar($cgi->param('search_cust')),
+ 'no_fuzzy_on_exact' => ! $curuser->option('enable_fuzzy_on_exact'),
+ );
}
@cust_main = grep { $_->ncancelled_pkgs || ! $_->all_pkgs } @cust_main