Update dao to support evenunsubscribe.
This commit is contained in:
parent
2bc2a5e791
commit
6dfb3978f2
@ -61,6 +61,11 @@ class Mailing extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $body;
|
public $body;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int 1=Email will be sent even to email that has opt-out
|
||||||
|
*/
|
||||||
|
public $evenunsubscribe;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int number of email
|
* @var int number of email
|
||||||
*/
|
*/
|
||||||
@ -317,6 +322,7 @@ class Mailing extends CommonObject
|
|||||||
$sql .= ", email_errorsto = '".$this->db->escape($this->email_errorsto)."'";
|
$sql .= ", email_errorsto = '".$this->db->escape($this->email_errorsto)."'";
|
||||||
$sql .= ", bgcolor = '".($this->bgcolor ? $this->db->escape($this->bgcolor) : null)."'";
|
$sql .= ", bgcolor = '".($this->bgcolor ? $this->db->escape($this->bgcolor) : null)."'";
|
||||||
$sql .= ", bgimage = '".($this->bgimage ? $this->db->escape($this->bgimage) : null)."'";
|
$sql .= ", bgimage = '".($this->bgimage ? $this->db->escape($this->bgimage) : null)."'";
|
||||||
|
$sql .= ", evenunsubscribe = ".((int) $this->evenunsubscribe);
|
||||||
$sql .= " WHERE rowid = ".(int) $this->id;
|
$sql .= " WHERE rowid = ".(int) $this->id;
|
||||||
|
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
@ -357,7 +363,7 @@ class Mailing extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT m.rowid, m.titre as title, m.sujet, m.body, m.bgcolor, m.bgimage";
|
$sql = "SELECT m.rowid, m.titre as title, m.sujet, m.body, m.bgcolor, m.bgimage, m.evenunsubscribe";
|
||||||
$sql .= ", m.email_from, m.email_replyto, m.email_errorsto";
|
$sql .= ", m.email_from, m.email_replyto, m.email_errorsto";
|
||||||
$sql .= ", m.statut, m.nbemail";
|
$sql .= ", m.statut, m.nbemail";
|
||||||
$sql .= ", m.fk_user_creat, m.fk_user_valid";
|
$sql .= ", m.fk_user_creat, m.fk_user_valid";
|
||||||
@ -389,6 +395,7 @@ class Mailing extends CommonObject
|
|||||||
|
|
||||||
$this->bgcolor = $obj->bgcolor;
|
$this->bgcolor = $obj->bgcolor;
|
||||||
$this->bgimage = $obj->bgimage;
|
$this->bgimage = $obj->bgimage;
|
||||||
|
$this->evenunsubscribe = $obj->evenunsubscribe;
|
||||||
|
|
||||||
$this->email_from = $obj->email_from;
|
$this->email_from = $obj->email_from;
|
||||||
$this->email_replyto = $obj->email_replyto;
|
$this->email_replyto = $obj->email_replyto;
|
||||||
@ -454,6 +461,7 @@ class Mailing extends CommonObject
|
|||||||
$object->body = '';
|
$object->body = '';
|
||||||
$object->bgcolor = '';
|
$object->bgcolor = '';
|
||||||
$object->bgimage = '';
|
$object->bgimage = '';
|
||||||
|
$object->evenunsubscribe = 0;
|
||||||
|
|
||||||
//$object->email_from = ''; // We do not reset from email because it is a mandatory value
|
//$object->email_from = ''; // We do not reset from email because it is a mandatory value
|
||||||
$object->email_replyto = '';
|
$object->email_replyto = '';
|
||||||
|
|||||||
@ -388,5 +388,5 @@ ALTER TABLE llx_bordereau_cheque ADD COLUMN label varchar(255) AFTER ref;
|
|||||||
|
|
||||||
ALTER TABLE llx_c_email_templates add COLUMN defaultfortype smallint DEFAULT 0;
|
ALTER TABLE llx_c_email_templates add COLUMN defaultfortype smallint DEFAULT 0;
|
||||||
|
|
||||||
ALTER TALBE llx_mailing ADD COLUMN evenunsubscribe smallint DEFAULT 0;
|
ALTER TABLE llx_mailing ADD COLUMN evenunsubscribe smallint DEFAULT 0;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user