Fix: retour sur la fiche catgorie aprs sa cration
This commit is contained in:
parent
964d282b4a
commit
00098feb58
@ -94,11 +94,11 @@ if ($_POST["action"] == 'add' && $user->rights->categorie->creer)
|
||||
|
||||
if ($categorie->error =="")
|
||||
{
|
||||
if ($categorie->create() > 0)
|
||||
$result = $categorie->create();
|
||||
if ($result > 0)
|
||||
{
|
||||
$_GET["action"] = 'confirmed';
|
||||
$_POST["addcat"] = '';
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -113,11 +113,16 @@ if ($_POST["action"] == 'add' && $user->rights->categorie->creer)
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/categorie.php?id='.$idProdOrigin.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||
exit;
|
||||
}
|
||||
if ($idSupplierOrigin || $idCompanyOrigin)
|
||||
else if ($idSupplierOrigin || $idCompanyOrigin)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/categorie.php?socid='.$idCompanyOrigin.'&mesg='.urlencode($langs->trans("CatCreated")));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$result.'&type='.$_POST["type"]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user