mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 19:41:26 +01:00
Fix: Errors with numberwords module
This commit is contained in:
@@ -146,8 +146,8 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'sendhtml')
|
|||||||
if ($_POST['action'] == 'sendhtml') $msgishtml=1; // Force message to HTML
|
if ($_POST['action'] == 'sendhtml') $msgishtml=1; // Force message to HTML
|
||||||
|
|
||||||
// Pratique les substitutions sur le sujet et message
|
// Pratique les substitutions sur le sujet et message
|
||||||
$subject=make_substitutions($subject,$substitutionarrayfortest);
|
$subject=make_substitutions($subject,$substitutionarrayfortest,$langs);
|
||||||
$body=make_substitutions($body,$substitutionarrayfortest);
|
$body=make_substitutions($body,$substitutionarrayfortest,$langs);
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||||
$mailfile = new CMailFile($subject,$sendto,$email_from,$body,
|
$mailfile = new CMailFile($subject,$sendto,$email_from,$body,
|
||||||
|
|||||||
@@ -184,8 +184,8 @@ if ($_POST["action"] == 'sendallconfirmed' && $_POST['confirm'] == 'yes')
|
|||||||
);
|
);
|
||||||
|
|
||||||
$substitutionisok=true;
|
$substitutionisok=true;
|
||||||
$newsubject=make_substitutions($subject,$substitutionarray);
|
$newsubject=make_substitutions($subject,$substitutionarray,$langs);
|
||||||
$newmessage=make_substitutions($message,$substitutionarray);
|
$newmessage=make_substitutions($message,$substitutionarray,$langs);
|
||||||
|
|
||||||
// Fabrication du mail
|
// Fabrication du mail
|
||||||
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage,
|
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage,
|
||||||
@@ -300,8 +300,8 @@ if ($_POST["action"] == 'send' && empty($_POST["cancel"]))
|
|||||||
if (preg_match('/[\s\t]*<html>/i',$message)) $msgishtml=1;
|
if (preg_match('/[\s\t]*<html>/i',$message)) $msgishtml=1;
|
||||||
|
|
||||||
// Pratique les substitutions sur le sujet et message
|
// Pratique les substitutions sur le sujet et message
|
||||||
$mil->sujet=make_substitutions($mil->sujet,$substitutionarrayfortest);
|
$mil->sujet=make_substitutions($mil->sujet,$substitutionarrayfortest,$langs);
|
||||||
$mil->body=make_substitutions($mil->body,$substitutionarrayfortest);
|
$mil->body=make_substitutions($mil->body,$substitutionarrayfortest,$langs);
|
||||||
|
|
||||||
$mailfile = new CMailFile($mil->sujet,$mil->sendto,$mil->email_from,$mil->body,
|
$mailfile = new CMailFile($mil->sujet,$mil->sendto,$mil->email_from,$mil->body,
|
||||||
$arr_file,$arr_mime,$arr_name,'', '', 0, $msgishtml,$mil->email_errorsto,$arr_css);
|
$arr_file,$arr_mime,$arr_name,'', '', 0, $msgishtml,$mil->email_errorsto,$arr_css);
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ class FormMail
|
|||||||
// Topic
|
// Topic
|
||||||
if ($this->withtopic)
|
if ($this->withtopic)
|
||||||
{
|
{
|
||||||
$this->withtopic=make_substitutions($this->withtopic,$this->substit);
|
$this->withtopic=make_substitutions($this->withtopic,$this->substit,$langs);
|
||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print "<td width=\"180\">".$langs->trans("MailTopic")."</td>";
|
print "<td width=\"180\">".$langs->trans("MailTopic")."</td>";
|
||||||
@@ -442,7 +442,7 @@ class FormMail
|
|||||||
if ($this->param["models"]=='propal_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendProposal"); }
|
if ($this->param["models"]=='propal_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendProposal"); }
|
||||||
if ($this->param["models"]=='order_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendOrder"); }
|
if ($this->param["models"]=='order_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendOrder"); }
|
||||||
|
|
||||||
$defaultmessage=make_substitutions($defaultmessage,$this->substit);
|
$defaultmessage=make_substitutions($defaultmessage,$this->substit,$langs);
|
||||||
if (isset($_POST["message"])) $defaultmessage=$_POST["message"];
|
if (isset($_POST["message"])) $defaultmessage=$_POST["message"];
|
||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
|
|||||||
@@ -2892,7 +2892,7 @@ function dol_textishtml($msg,$option=0)
|
|||||||
* \param object If we want to add more substitution, we provide a source object
|
* \param object If we want to add more substitution, we provide a source object
|
||||||
* \return string Output string after subsitutions
|
* \return string Output string after subsitutions
|
||||||
*/
|
*/
|
||||||
function make_substitutions($chaine,$substitutionarray,$outputlangs='',$object='')
|
function make_substitutions($chaine,$substitutionarray,$outputlangs,$object='')
|
||||||
{
|
{
|
||||||
global $conf,$user;
|
global $conf,$user;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user