diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-09-05 21:05:14 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-09-05 21:05:14 -0700 |
commit | 9e0abf502762db98b6aab1aaec0508d339bddb92 (patch) | |
tree | 5b4d1868025adfb1117112f69a66e33e6933acf2 | |
parent | cf14219879b437bd63e15b77b96f55103a645531 (diff) |
add no_fuzzy_on_exact global, RT#24804
-rw-r--r-- | httemplate/pref/pref.html | 8 | ||||
-rwxr-xr-x | httemplate/search/cust_main.cgi | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html index dc44db0b0..d2b8835e7 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -108,6 +108,12 @@ Interface </TD> </TR> +% if ( FS::Conf->new->exists('enable_fuzzy_on_exact') ) { + + <INPUT TYPE="hidden" NAME="enable_fuzzy_on_exact" VALUE="<% $curuser->option('enable_fuzzy_on_exact') ? 1 : 0 %>"> + +% } else { + <TR> <TH ALIGN="right" COLSPAN=1>Enable approximate customer searching <BR>even when an exact match is found: </TH> <TD ALIGN="left" COLSPAN=2> @@ -115,6 +121,8 @@ Interface </TD> </TR> +% } + <TR> <TH ALIGN="right" COLSPAN=1>Disable HTML editor for customer notes: </TH> <TD ALIGN="left" COLSPAN=2> 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') + ), ); } |