From 63f6707a7bd4b838f2ef607947b83898d6fe2d4d Mon Sep 17 00:00:00 2001 From: FHenry Date: Mon, 21 May 2012 16:16:24 +0200 Subject: [PATCH] correct bug #410 Conflicts: htdocs/comm/mailing/cibles.php --- htdocs/comm/mailing/cibles.php | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 0b642de04ce..ff13527b06a 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -127,10 +127,26 @@ if ($action == 'delete') $sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id; $resql=$db->query($sql); if ($resql) - { - $classname = "MailingTargets"; - $obj = new $classname($db); - $obj->update_nb($id); + { //on récurpére l'id du mailing + $id = GETPOST('id','int'); + + if (!empty($id)) + { + $file = $dirmod."/modules_mailings.php"; + $classname = "MailingTargets"; + require_once($file); + + $obj = new $classname($db); + $obj->update_nb($id); + + Header("Location: cibles.php?id=".$id); + exit; + } + else + { + Header("Location: liste.php"); + exit; + } } else {