From 42e47b2b9a554e5c5eb31f14663c761b04fdb2cf Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 15 Apr 2005 11:47:50 +0000 Subject: [PATCH] Correction bug de recherche --- htdocs/product/liste.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 8260de03d0f..60455311986 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -46,8 +46,6 @@ $type=isset($_GET["type"])?$_GET["type"]:$_POST["type"]; $sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"]; $sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; $page = $_GET["page"]; -if ($page < 0) { - $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; @@ -84,9 +82,9 @@ if ($_POST["mode"] == 'search') else { $sql .= " WHERE 1=1"; - if (isset($_GET["type"]) || isset($_POST["type"])) + if (strlen($_GET["type"]) || strlen($_POST["type"])) { - $sql .= " AND p.fk_product_type = ".(isset($_GET["type"])?$_GET["type"]:$_POST["type"]); + $sql .= " AND p.fk_product_type = ".(strlen($_GET["type"])?$_GET["type"]:$_POST["type"]); } if ($sref) {