diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2013-09-05 21:05:18 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2013-09-05 21:05:18 -0700 |
| commit | 0363eb9628449eaf4edb323b85c1a0c06ffee985 (patch) | |
| tree | d3f33ee5e75f04b9a22040bf771f7b0a1a847b01 | |
| parent | b3738526127db6306b8457212b08a5763108bae1 (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 05ea9d184..fcd259615 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -91,6 +91,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 even when an exact match is found: </TH> <TD ALIGN="left" COLSPAN=2> @@ -98,6 +104,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 224166b70..d2c1221a4 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -494,7 +494,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') + ), ); } |
