Merge branch '3.2' of https://github.com/Dolibarr/dolibarr into 3.2
This commit is contained in:
commit
96294403e2
@ -151,13 +151,26 @@ if ($action == 'delete')
|
||||
$sql="DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles where rowid=".$id;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$file = $dirmod."/modules_mailings.php";
|
||||
$classname = "MailingTargets";
|
||||
require_once($file);
|
||||
{ //on récurpére l'id du mailing
|
||||
$id = GETPOST('id','int');
|
||||
|
||||
$obj = new $classname($db);
|
||||
$obj->update_nb($id);
|
||||
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
|
||||
{
|
||||
|
||||
@ -402,6 +402,7 @@ elseif ($action == 'update_line')
|
||||
if ($_REQUEST['etat'] == '1' && ! $_REQUEST['cancel']) // si on valide la modification
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
if ($_POST['puht'])
|
||||
{
|
||||
|
||||
@ -198,15 +198,18 @@ if (empty($reshook))
|
||||
$action = ($action=='add'?'create':'edit');
|
||||
}
|
||||
|
||||
// Check for duplicate prof id
|
||||
for ($i = 1; $i < 3; $i++)
|
||||
{
|
||||
$slabel="idprof".$i;
|
||||
if (($_POST[$slabel] && $object->id_prof_verifiable($i)))
|
||||
$slabel="idprof".$i;
|
||||
$_POST[$slabel]=trim($_POST[$slabel]);
|
||||
$vallabel=$_POST[$slabel];
|
||||
if ($vallabel && $object->id_prof_verifiable($i))
|
||||
{
|
||||
if($object->id_prof_exists($i,$_POST["$slabel"],$object->id))
|
||||
if($object->id_prof_exists($i,$vallabel,$object->id))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$error++; $errors[] = $langs->transcountry('ProfId'.$i, $object->country_code)." ".$langs->trans("ErrorProdIdAlreadyExist", $_POST[$slabel]);
|
||||
$error++; $errors[] = $langs->transcountry('ProfId'.$i, $object->country_code)." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel);
|
||||
$action = ($action=='add'?'create':'edit');
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user