Fix: Errors with numberwords module

This commit is contained in:
Laurent Destailleur
2009-11-01 15:26:56 +00:00
parent c646b89f55
commit aa1a21c7e4
4 changed files with 9 additions and 9 deletions

View File

@@ -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,

View File

@@ -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);

View File

@@ -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>";

View File

@@ -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;