Fix: bug #14981 overview: Problème ajout produit si catégorie activé

This commit is contained in:
Laurent Destailleur 2005-12-25 00:32:56 +00:00
parent 0ec2847183
commit 6784aaf9a9

View File

@ -58,17 +58,10 @@ function llxHeader($head = "", $title="", $help_url='',$addons='')
$menu->add_submenu(DOL_URL_ROOT."/fourn/product/liste.php?type=0", $langs->trans("List")); $menu->add_submenu(DOL_URL_ROOT."/fourn/product/liste.php?type=0", $langs->trans("List"));
if ($user->societe_id == 0 && $user->rights->produit->creer) if ($user->societe_id == 0 && $user->rights->produit->creer)
{
if ($conf->categorie->enabled)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/product/fiche.php?action=create&type=0&catid=".$_REQUEST['catid'], $langs->trans("NewProduct"));
}
else
{ {
$menu->add_submenu(DOL_URL_ROOT."/fourn/product/fiche.php?action=create&type=0", $langs->trans("NewProduct")); $menu->add_submenu(DOL_URL_ROOT."/fourn/product/fiche.php?action=create&type=0", $langs->trans("NewProduct"));
} }
} }
}
if ($conf->categorie->enabled) if ($conf->categorie->enabled)
{ {
@ -77,7 +70,7 @@ function llxHeader($head = "", $title="", $help_url='',$addons='')
$menu->add('liste.php','Top'); $menu->add('liste.php','Top');
if (isset($_REQUEST['catid']) && $_REQUEST['catid'] != '') if (isset($_REQUEST['catid']) && $_REQUEST['catid'])
{ {
$catid = $_REQUEST['catid']; $catid = $_REQUEST['catid'];