Fix: bad action if error

This commit is contained in:
Regis Houssin 2009-10-09 13:24:39 +00:00
parent 33516d6fce
commit 7ff87fc550

View File

@ -131,13 +131,13 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"])
{ {
$error = 1; $error = 1;
$soc->error = $langs->trans("ErrorBadEMail",$soc->email); $soc->error = $langs->trans("ErrorBadEMail",$soc->email);
$_GET["action"]= $_POST["action"]=='add'?'add':'edit'; $_GET["action"] = $_POST["action"]=='add'?'create':'edit';
} }
if ($soc->fournisseur && ! $conf->fournisseur->enabled) if ($soc->fournisseur && ! $conf->fournisseur->enabled)
{ {
$error = 1; $error = 1;
$soc->error = $langs->trans("ErrorSupplierModuleNotEnabled"); $soc->error = $langs->trans("ErrorSupplierModuleNotEnabled");
$_GET["action"]= $_POST["action"]=='add'?'add':'edit'; $_GET["action"] = $_POST["action"]=='add'?'create':'edit';
} }
} }