Fix code for cli must be similar to same code for gui version.
This commit is contained in:
parent
b824912473
commit
71cf137da4
@ -168,6 +168,8 @@ if ($resql) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
$thirdpartystatic = new Societe($db);
|
||||
|
||||
// Look on each email and sent message
|
||||
$i = 0;
|
||||
while ($i < $num2) {
|
||||
@ -200,6 +202,15 @@ if ($resql) {
|
||||
|
||||
// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
|
||||
$substitutionarray['__ID__'] = $obj->source_id;
|
||||
if ($obj->source_type == "thirdparty") {
|
||||
$result = $thirdpartystatic->fetch($obj->source_id);
|
||||
|
||||
if ($result > 0) {
|
||||
$substitutionarray['__THIRDPARTY_CUSTOMER_CODE__'] = $thirdpartystatic->code_client;
|
||||
} else {
|
||||
$substitutionarray['__THIRDPARTY_CUSTOMER_CODE__'] = '';
|
||||
}
|
||||
}
|
||||
$substitutionarray['__EMAIL__'] = $obj->email;
|
||||
$substitutionarray['__LASTNAME__'] = $obj->lastname;
|
||||
$substitutionarray['__FIRSTNAME__'] = $obj->firstname;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user