From 7ff74aec7c627cfff90e6746081fcf011e62508b Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 5 Sep 2013 21:05:16 -0700 Subject: [PATCH] add no_fuzzy_on_exact global, RT#24804 --- httemplate/pref/pref.html | 8 ++++++++ httemplate/search/cust_main.cgi | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html index 5babb0181..626f46552 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -106,6 +106,12 @@ Interface +% if ( FS::Conf->new->exists('enable_fuzzy_on_exact') ) { + + + +% } else { + Enable approximate customer searching
even when an exact match is found: @@ -113,6 +119,8 @@ Interface +% } + Disable HTML editor for customer notes: diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 2c09c692c..69f04f5e1 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -470,7 +470,9 @@ if ( $cgi->param('browse') $orderby = "ORDER BY LOWER(company || ' ' || last || ' ' || first )"; push @cust_main, smart_search( 'search' => scalar($cgi->param('search_cust')), - 'no_fuzzy_on_exact' => ! $curuser->option('enable_fuzzy_on_exact'), + 'no_fuzzy_on_exact' => ! ( $curuser->option('enable_fuzzy_on_exact') + || $conf->exists('enable_fuzzy_on_exact') + ), ); } -- 2.11.0