Merge pull request #17295 from atm-gauthier/fix_adv_target_emailing_extrafields_link
FIX : type link extrafield case for advanced target emailing
This commit is contained in:
commit
7a6edfd61f
@ -640,6 +640,10 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
if ($arrayquery['options_'.$key]!=''){
|
if ($arrayquery['options_'.$key]!=''){
|
||||||
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")";
|
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")";
|
||||||
}
|
}
|
||||||
|
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') {
|
||||||
|
if ($arrayquery['options_'.$key] > 0) {
|
||||||
|
$sqlwhere[]= " (te.".$key." = ".((int) $arrayquery['options_'.$key]).")";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (is_array($arrayquery['options_'.$key])) {
|
if (is_array($arrayquery['options_'.$key])) {
|
||||||
$sqlwhere[]= " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))";
|
$sqlwhere[]= " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))";
|
||||||
@ -666,7 +670,6 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
$this->thirdparty_lines[$i] = $obj->rowid;
|
$this->thirdparty_lines[$i] = $obj->rowid;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user