This commit is contained in:
florian HENRY 2016-06-30 17:10:06 +02:00
parent 388bd5ca48
commit 37ee64ae9b
3 changed files with 19 additions and 19 deletions

View File

@ -221,7 +221,7 @@ if ($action == 'add') {
if ((count($advTarget->thirdparty_lines) > 0) || (count($advTarget->contact_lines) > 0)) { if ((count($advTarget->thirdparty_lines) > 0) || (count($advTarget->contact_lines) > 0)) {
// Add targets into database // Add targets into database
$obj = new mailing_advthirdparties($db); $obj = new mailing_advthirdparties($db);
$result = $obj->add_to_target($id, $advTarget->thirdparty_lines, $array_query['type_of_target'], $advTarget->contact_lines); $result = $obj->add_to_target_spec($id, $advTarget->thirdparty_lines, $array_query['type_of_target'], $advTarget->contact_lines);
} else { } else {
$result = 0; $result = 0;
} }

View File

@ -46,7 +46,7 @@ function emailing_prepare_head(Mailing $object)
$head[$h][2] = 'targets'; $head[$h][2] = 'targets';
$h++; $h++;
if (! empty($conf->global->EMAILING_USE_ADVANCED_SELECTOR)) // Still need debug if (! empty($conf->global->EMAILING_USE_ADVANCED_SELECTOR))
{ {
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/advtargetemailing.php?id=".$object->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/advtargetemailing.php?id=".$object->id;
$head[$h][1] = $langs->trans("MailAdvTargetRecipients"); $head[$h][1] = $langs->trans("MailAdvTargetRecipients");

View File

@ -56,7 +56,7 @@ class mailing_advthirdparties extends MailingTargets
* @param array $contactid Array of contact id to add * @param array $contactid Array of contact id to add
* @return int <0 if error, number of emails added if ok * @return int <0 if error, number of emails added if ok
*/ */
function add_to_target($mailing_id,$socid,$type_of_target, $contactid) function add_to_target_spec($mailing_id,$socid,$type_of_target, $contactid)
{ {
global $conf, $langs; global $conf, $langs;
@ -202,7 +202,7 @@ class mailing_advthirdparties extends MailingTargets
* *
* @return int Nb of recipients * @return int Nb of recipients
*/ */
function getNbOfRecipients() function getNbOfRecipients($sql)
{ {
global $conf; global $conf;