correct bug #410

This commit is contained in:
FHenry 2012-05-21 11:00:08 +02:00
parent 1725e5b591
commit 23226ad472

View File

@ -151,6 +151,10 @@ if ($action == 'delete')
$sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id; $sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id;
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)
{ //on récurpére l'id du mailing
$id = GETPOST('id','int');
if (!empty($id))
{ {
$file = $dirmod."/modules_mailings.php"; $file = $dirmod."/modules_mailings.php";
$classname = "MailingTargets"; $classname = "MailingTargets";
@ -158,6 +162,15 @@ if ($action == 'delete')
$obj = new $classname($db); $obj = new $classname($db);
$obj->update_nb($id); $obj->update_nb($id);
Header("Location: cibles.php?id=".$id);
exit;
}
else
{
Header("Location: liste.php");
exit;
}
} }
else else
{ {