From 48f20e4d8d3989f29475bf52537d930f61c74213 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Jul 2010 23:40:53 +0000 Subject: [PATCH] Fix: Restore search anywhere with ajax --- htdocs/core/class/html.form.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index eb863eedbd2..428ca628b73 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -910,7 +910,7 @@ class Form } if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype; // Add criteria on ref/label - if (empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE)) + if (! empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE)) { if ($ajaxkeysearch && $ajaxkeysearch != '') { @@ -1113,7 +1113,7 @@ class Form if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype; if (! empty($filtre)) $sql.=" ".$filtre; // Add criteria on ref/label - if (empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE)) + if (! empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE)) { if ($ajaxkeysearch && $ajaxkeysearch != '') $sql.=" AND (pf.ref_fourn like '%".$ajaxkeysearch."%' OR p.ref like '%".$ajaxkeysearch."%' OR p.label like '%".$ajaxkeysearch."%')"; }