From 97119c8558143320983a7a86baf57c69f2a4bbdd Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 3 May 2006 16:40:10 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20fonction=20ajax=20-=20d=E9sactiv=E9e=20?= =?UTF-8?q?par=20d=E9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/html.form.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 781191c0490..a165f1db47d 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -644,7 +644,7 @@ class Form * \param filtretype Pour filtre sur type de produit * \param limit Limite sur le nombre de lignes retournées */ - function select_produits_do($selected='',$htmlname='productid',$filtretype='',$limit=20,$price_level=0) + function select_produits_do($selected='',$htmlname='productid',$filtretype='',$limit=20,$price_level=0,$ajaxkey='') { global $langs,$conf,$user; @@ -661,6 +661,7 @@ class Form $sql.= ' AND IFNULL(c.visible,1)=1'; } if ($filtretype && $filtretype != '') $sql.=" AND p.fk_product_type=".$filtretype; + if ($ajaxkey && $ajaxkey != '') $sql.=" AND p.label like '%".$ajaxkey."%'"; $sql.= " ORDER BY p.nbvente DESC"; if ($limit) $sql.= " LIMIT $limit";