From 58eb02274fcd1d2bc0275f45891ff077480fbe6c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Oct 2012 12:13:24 +0200 Subject: [PATCH] Fix: We must not use strtolower. Case sensitive search or not must be managed by the LIKE or LIKE BINARY into request (this make code portable on other database with the database driver and this avoid errors of strtolower when using non latin characters). --- htdocs/comm/list.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index 7f461282359..2572c6391ab 100755 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -117,10 +117,10 @@ if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid; if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'"; -if ($search_zipcode) $sql.= " AND s.cp LIKE '%".$db->escape(strtolower($search_zipcode))."%'"; -if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape(strtolower($search_ville))."%'"; -if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape(strtolower($search_code))."%'"; +if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'"; +if ($search_zipcode) $sql.= " AND s.cp LIKE '%".$db->escape($search_zipcode)."%'"; +if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape($search_ville)."%'"; +if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'"; if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'"; // Insert sale filter if ($search_sale)