Fix: Cancel button was broken

This commit is contained in:
Laurent Destailleur 2009-05-08 15:30:47 +00:00
parent 305a843466
commit e9cb5e8da7

View File

@ -124,6 +124,8 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"])
$soc->commercial_id = $_POST["commercial_id"]; $soc->commercial_id = $_POST["commercial_id"];
// Check parameters // Check parameters
if (empty($_POST["cancel"]))
{
if (! empty($soc->email) && ! isValidEMail($soc->email)) if (! empty($soc->email) && ! isValidEMail($soc->email))
{ {
$error = 1; $error = 1;
@ -136,6 +138,7 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"])
$soc->error = $langs->trans("ErrorSupplierModuleNotEnabled"); $soc->error = $langs->trans("ErrorSupplierModuleNotEnabled");
$_GET["action"]= $_POST["action"]=='add'?'add':'edit'; $_GET["action"]= $_POST["action"]=='add'?'add':'edit';
} }
}
if (! $error) if (! $error)
{ {