FIX : type link extrafield case for advanced target emailing

This commit is contained in:
Gauthier PC portable 024 2021-04-16 16:55:19 +02:00
parent 521dec7792
commit f8fcf7c16b

View File

@ -640,6 +640,10 @@ class AdvanceTargetingMailing extends CommonObject
if ($arrayquery['options_'.$key]!=''){
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")";
}
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') {
if ($arrayquery['options_'.$key] > 0){
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")";
}
} else {
if (is_array($arrayquery['options_'.$key])) {
$sqlwhere[]= " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))";
@ -666,7 +670,6 @@ class AdvanceTargetingMailing extends CommonObject
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
$this->thirdparty_lines[$i] = $obj->rowid;
$i++;