From f8fcf7c16b68fa4fe4bc80820be42808b5826df3 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Fri, 16 Apr 2021 16:55:19 +0200 Subject: [PATCH] FIX : type link extrafield case for advanced target emailing --- htdocs/comm/mailing/class/advtargetemailing.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 6987a27dacd..ff2e056344c 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -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++;