From 7f7676d357102c91856ebd7fdd970e4ef283f5e0 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 8 Oct 2012 20:44:12 +0200 Subject: [PATCH] Fix: uniformize variable name --- htdocs/categories/categorie.php | 6 +++--- htdocs/product/composition/fiche.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index a69ded5360d..05ff763d67f 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -39,7 +39,7 @@ $type = GETPOST('type'); $mesg = GETPOST('mesg'); $removecat = GETPOST('removecat','int'); -$catMere=GETPOST('catMere','int'); +$parent=GETPOST('parent','int'); $dbtablename = ''; @@ -122,7 +122,7 @@ if ($removecat > 0) } // Add object into a category -if ($catMere > 0) +if ($parent > 0) { if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer)) { @@ -151,7 +151,7 @@ if ($catMere > 0) $elementtype = 'member'; } $cat = new Categorie($db); - $result=$cat->fetch($catMere); + $result=$cat->fetch($parent); $result=$cat->add_type($object,$elementtype); if ($result >= 0) diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index f8b90a48a00..5be28fc93ae 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -41,7 +41,7 @@ $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); $cancel=GETPOST('cancel','alpha'); $key=GETPOST('key'); -$catMere=GETPOST('catMere'); +$parent=GETPOST('parent'); // Security check if (! empty($user->societe_id)) $socid=$user->societe_id; @@ -144,9 +144,9 @@ if ($action == 'search') $sql.= " OR p.label LIKE '%".$key."%')"; } } - if (! empty($conf->categorie->enabled) && $catMere != -1 and $catMere) + if (! empty($conf->categorie->enabled) && ! empty($parent) && $parent != -1) { - $sql.= " AND cp.fk_categorie ='".$db->escape($catMere)."'"; + $sql.= " AND cp.fk_categorie ='".$db->escape($parent)."'"; } $sql.= " ORDER BY p.ref ASC"; @@ -366,7 +366,7 @@ if ($id || $ref) if (! empty($conf->categorie->enabled)) { print ''.$langs->trans("CategoryFilter").'   '; - print ''.$form->select_all_categories(0,$catMere).''; + print ''.$form->select_all_categories(0, $parent).''; } print '';