commit
18aff92366
@ -140,6 +140,9 @@ if (($action == 'send' || $action == 'sendhtml') && GETPOST('cancel'))
|
||||
if (($action == 'send' || $action == 'sendhtml') && ! GETPOST('addfile') && ! GETPOST('addfilehtml') && ! GETPOST('removedfile') && ! GETPOST('cancel'))
|
||||
{
|
||||
$error=0;
|
||||
|
||||
|
||||
|
||||
|
||||
$email_from='';
|
||||
if (! empty($_POST["fromname"])) $email_from=$_POST["fromname"].' ';
|
||||
@ -152,7 +155,12 @@ if (($action == 'send' || $action == 'sendhtml') && ! GETPOST('addfile') && ! GE
|
||||
$subject = $_POST['subject'];
|
||||
$body = $_POST['message'];
|
||||
$deliveryreceipt= $_POST["deliveryreceipt"];
|
||||
|
||||
|
||||
//Check if we have to decode HTML
|
||||
if (!empty($conf->global->FCKEDITOR_ENABLE_MAILING) && dol_textishtml(dol_html_entity_decode($body, ENT_COMPAT | ENT_HTML401))) {
|
||||
$body=dol_html_entity_decode($body, ENT_COMPAT | ENT_HTML401);
|
||||
}
|
||||
|
||||
// Create form object
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($db);
|
||||
|
||||
@ -179,6 +179,8 @@ class Mailing extends CommonObject
|
||||
*/
|
||||
function fetch($rowid)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT m.rowid, m.titre, m.sujet, m.body, m.bgcolor, m.bgimage";
|
||||
$sql.= ", m.email_from, m.email_replyto, m.email_errorsto";
|
||||
$sql.= ", m.statut, m.nbemail";
|
||||
@ -203,8 +205,14 @@ class Mailing extends CommonObject
|
||||
$this->statut = $obj->statut;
|
||||
$this->nbemail = $obj->nbemail;
|
||||
$this->titre = $obj->titre;
|
||||
$this->sujet = $obj->sujet;
|
||||
$this->body = $obj->body;
|
||||
|
||||
$this->sujet = $obj->sujet;
|
||||
if (!empty($conf->global->FCKEDITOR_ENABLE_MAILING) && dol_textishtml(dol_html_entity_decode($obj->body, ENT_COMPAT | ENT_HTML401))) {
|
||||
$this->body = dol_html_entity_decode($obj->body, ENT_COMPAT | ENT_HTML401);
|
||||
}else {
|
||||
$this->body = $obj->body;
|
||||
}
|
||||
|
||||
$this->bgcolor = $obj->bgcolor;
|
||||
$this->bgimage = $obj->bgimage;
|
||||
|
||||
|
||||
@ -169,6 +169,9 @@ class DolEditor
|
||||
//$skin='office2003';
|
||||
//$skin='v2';
|
||||
$skin='kama';
|
||||
|
||||
if ($this->toolbarname=='dolibarr_mailings') {$htmlencode_force='true';}
|
||||
else {$htmlencode_force='false';}
|
||||
|
||||
$out.= '<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
@ -177,6 +180,7 @@ class DolEditor
|
||||
CKEDITOR.replace(\''.$this->htmlname.'\',
|
||||
{
|
||||
customConfig : ckeditorConfig,
|
||||
htmlEncodeOutput :'.$htmlencode_force.',
|
||||
toolbar: \''.$this->toolbarname.'\',
|
||||
toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').',
|
||||
width: '.($this->width ? '\''.$this->width.'\'' : '\'\'').',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user