From 6adcc7a6fefd9d47c6c3212449e79d4895757503 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 31 Mar 2006 12:42:56 +0000 Subject: [PATCH] =?UTF-8?q?d=E9but=20ajout=20possibilit=E9=20de=20d=E9term?= =?UTF-8?q?iner=20si=20le=20contenu=20d'une=20cat=E9gorie=20sera=20visible?= =?UTF-8?q?=20ou=20=20non=20dans=20la=20liste=20des=20produits/services,?= =?UTF-8?q?=20ceci=20afin=20de=20pouvoir=20cacher=20les=20sous-produits=20?= =?UTF-8?q?=20par=20exemple.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 47881c9cc61..a9909057e85 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -118,6 +118,13 @@ print ''; $max=15; $sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.envente"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; +if (!$user->rights->categorie->voir) +{ + $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; + $sql .= ", ".MAIN_DB_PREFIX."categorie as c"; + $sql .= " WHERE cp.fk_product = p.rowid"; + $sql .= " AND cp.fk_categorie = c.rowid AND c.visible = 1"; +} $sql.= " ORDER BY p.datec DESC "; $sql.= $db->plimit($max,0); $result = $db->query($sql) ;