Fix: uniformize variable name
This commit is contained in:
parent
c35a1ebaf7
commit
7f7676d357
@ -39,7 +39,7 @@ $type = GETPOST('type');
|
|||||||
$mesg = GETPOST('mesg');
|
$mesg = GETPOST('mesg');
|
||||||
|
|
||||||
$removecat = GETPOST('removecat','int');
|
$removecat = GETPOST('removecat','int');
|
||||||
$catMere=GETPOST('catMere','int');
|
$parent=GETPOST('parent','int');
|
||||||
|
|
||||||
$dbtablename = '';
|
$dbtablename = '';
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ if ($removecat > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add object into a category
|
// Add object into a category
|
||||||
if ($catMere > 0)
|
if ($parent > 0)
|
||||||
{
|
{
|
||||||
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
|
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||||
{
|
{
|
||||||
@ -151,7 +151,7 @@ if ($catMere > 0)
|
|||||||
$elementtype = 'member';
|
$elementtype = 'member';
|
||||||
}
|
}
|
||||||
$cat = new Categorie($db);
|
$cat = new Categorie($db);
|
||||||
$result=$cat->fetch($catMere);
|
$result=$cat->fetch($parent);
|
||||||
|
|
||||||
$result=$cat->add_type($object,$elementtype);
|
$result=$cat->add_type($object,$elementtype);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $action=GETPOST('action','alpha');
|
|||||||
$confirm=GETPOST('confirm','alpha');
|
$confirm=GETPOST('confirm','alpha');
|
||||||
$cancel=GETPOST('cancel','alpha');
|
$cancel=GETPOST('cancel','alpha');
|
||||||
$key=GETPOST('key');
|
$key=GETPOST('key');
|
||||||
$catMere=GETPOST('catMere');
|
$parent=GETPOST('parent');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
if (! empty($user->societe_id)) $socid=$user->societe_id;
|
||||||
@ -144,9 +144,9 @@ if ($action == 'search')
|
|||||||
$sql.= " OR p.label LIKE '%".$key."%')";
|
$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";
|
$sql.= " ORDER BY p.ref ASC";
|
||||||
|
|
||||||
@ -366,7 +366,7 @@ if ($id || $ref)
|
|||||||
if (! empty($conf->categorie->enabled))
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("CategoryFilter").' </td>';
|
print '<tr><td>'.$langs->trans("CategoryFilter").' </td>';
|
||||||
print '<td>'.$form->select_all_categories(0,$catMere).'</td></tr>';
|
print '<td>'.$form->select_all_categories(0, $parent).'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user