From e07486b6265423d0bb59cdd1450312b81e22f64c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Dec 2020 02:20:10 +0100 Subject: [PATCH] Fix columns of download of list of targets of emailing --- htdocs/comm/mailing/cibles.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 6d9587961c6..bcf1e9c1e3b 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -131,8 +131,8 @@ if (GETPOST('exportcsv', 'int')) header('Content-Disposition: attachment;filename='.$completefilename); // List of selected targets - $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut, mc.date_envoi, mc.tms,"; - $sql .= " mc.source_url, mc.source_id, mc.source_type, mc.error_text"; + $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut as status, mc.date_envoi, mc.tms,"; + $sql .= " mc.source_id, mc.source_type, mc.error_text"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.fk_mailing=".$object->id; $sql .= $db->order($sortfield, $sortorder); @@ -146,16 +146,16 @@ if (GETPOST('exportcsv', 'int')) while ($obj = $db->fetch_object($resql)) { print $obj->rowid.$sep; - print $obj->lastname.$sep; - print $obj->firstname.$sep; + print '"'.$obj->lastname.'"'.$sep; + print '"'.$obj->firstname.'"'.$sep; print $obj->email.$sep; print $obj->other.$sep; - print $obj->date_envoi.$sep; print $obj->tms.$sep; - print $obj->source_url.$sep; - print $obj->source_id.$sep; print $obj->source_type.$sep; - print $obj->error_text.$sep; + print $obj->source_id.$sep; + print $obj->date_envoi.$sep; + print $obj->status.$sep; + print '"'.$obj->error_text.'"'.$sep; print "\n"; }