Fix: Problme sur les substitutions en mode tests mailing
This commit is contained in:
parent
cc83f13634
commit
28d1b60604
@ -93,7 +93,7 @@ if ($_POST["action"] == 'cotisation' && ! $_POST["cancel"])
|
||||
|
||||
if ($adht->cotisation)
|
||||
{
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
if (! $_POST["label"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Label"));
|
||||
if (! $_POST["operation"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode"));
|
||||
@ -371,35 +371,35 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td><input type="text" name="cotisation" size="6" value="'.$_POST["cotisation"].'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("FinancialAccount").'</td><td>';
|
||||
$html->select_comptes($_POST["accountid"],'accountid',0,'',1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td>';
|
||||
$html->select_types_paiements($_POST["operation"],'operation');
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Numero');
|
||||
print ' <em>(Numéro chèque ou virement)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="num_chq" type="text" size="8" value="'.(empty($_POST['num_chq'])?'':$_POST['num_chq']).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('CheckTransmitter');
|
||||
print ' <em>(Emetteur du chèque)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->nom:$_POST['chqemetteur']).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Bank');
|
||||
print ' <em>(Banque du chèque)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="chqbank" size="32" type="text" value="'.(empty($_POST['chqbank'])?'':$_POST['chqbank']).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td><input name="label" type="text" size="32" value="'.$langs->trans("Subscription").' ';
|
||||
print strftime("%Y",($adh->datefin?$adh->datefin:time())).'" ></td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td>';
|
||||
$html->select_types_paiements($_POST["operation"],'operation');
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Numero');
|
||||
print ' <em>(Numéro chèque ou virement)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="num_chq" type="text" size="8" value="'.(empty($_POST['num_chq'])?'':$_POST['num_chq']).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('CheckTransmitter');
|
||||
print ' <em>(Emetteur du chèque)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->nom:$_POST['chqemetteur']).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Bank');
|
||||
print ' <em>(Banque du chèque)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="chqbank" size="32" type="text" value="'.(empty($_POST['chqbank'])?'':$_POST['chqbank']).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td><input name="label" type="text" size="32" value="'.$langs->trans("Subscription").' ';
|
||||
print strftime("%Y",($adh->datefin?$adh->datefin:time())).'" ></td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("SendAcknowledgementByMail").'</td>';
|
||||
|
||||
@ -142,7 +142,7 @@ if ($result)
|
||||
print_liste_field_titre($langs->trans("Ref"),"cotisations.php","c.rowid",$param,"","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Date"),"cotisations.php","c.dateadh",$param,"","",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.nom",$param,"","",$sortfield);
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
print_liste_field_titre($langs->trans("Bank"),"cotisations.php","b.fk_account",$pram,"","",$sortfield);
|
||||
}
|
||||
@ -169,7 +169,7 @@ if ($result)
|
||||
print '<td>'.$cotisation->getNomUrl(1).'</td>';
|
||||
print '<td>'.dolibarr_print_date($objp->dateadh)."</td>\n";
|
||||
print '<td>'.$adherent->getNomUrl(1).'</td>';
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
if ($objp->fk_account)
|
||||
{
|
||||
@ -206,7 +206,7 @@ if ($result)
|
||||
print "<td>".$langs->trans("Total")."</td>\n";
|
||||
print "<td align=\"right\"> </td>\n";
|
||||
print "<td align=\"right\"> </td>\n";
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
@ -136,20 +136,28 @@ print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
// Insertion cotisations dans compte financier
|
||||
$var=!$var;
|
||||
print '<form action="adherent.php" method="POST">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
|
||||
print "<tr $bc[$var] class=value><td>".$langs->trans("AddSubscriptionIntoAccount").'</td>';
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<form action="adherent.php" method="POST">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
|
||||
print "<tr $bc[$var] class=value><td>".$langs->trans("AddSubscriptionIntoAccount").'</td><td>';
|
||||
print $form->selectyesno('constvalue',$conf->global->ADHERENT_BANK_USE,1);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
print '<td>';
|
||||
print $form->selectyesno('constvalue',$conf->global->ADHERENT_BANK_USE,1);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right" colspan="2">';
|
||||
print $langs->trans("WarningModuleNotActive",$langs->transnoentities("Module85Name")).' '.img_warning("","");
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -38,10 +38,10 @@ if (!$user->admin)
|
||||
// Constante et traduction de la description du module
|
||||
$modules = array(
|
||||
'SOCIETE' => 'FCKeditorForCompany',
|
||||
'PRODUCTDESC' => 'FCKeditorForProductDescription',
|
||||
'PRODUCTNOTE' => 'FCKeditorForProductNote',
|
||||
'PRODUCTDESC' => 'FCKeditorForProduct',
|
||||
'DETAILS' => 'FCKeditorForProductDetails',
|
||||
'MAILING' => 'FCKeditorForMailing'
|
||||
'MAILING' => 'FCKeditorForMailing',
|
||||
'MEMBER' => 'FCKeditorForMembers'
|
||||
);
|
||||
// Conditions pour que l'option soit proposée
|
||||
$conditions = array(
|
||||
@ -49,7 +49,16 @@ $conditions = array(
|
||||
'PRODUCTDESC' => ($conf->produit->enabled||$conf->service->enabled),
|
||||
'PRODUCTNOTE' => ($conf->produit->enabled||$conf->service->enabled),
|
||||
'DETAILS' => ($conf->facture->enabled||$conf->propal->enabled||$conf->commande->enabled),
|
||||
'MAILING' => $conf->mailing->enabled
|
||||
'MAILING' => $conf->mailing->enabled,
|
||||
'MEMBER' => $conf->adherent->enabled
|
||||
);
|
||||
// Picto
|
||||
$picto = array(
|
||||
'SOCIETE' => 'company',
|
||||
'PRODUCTDESC' => 'product',
|
||||
'DETAILS' => 'generic',
|
||||
'MAILING' => 'email',
|
||||
'MEMBER' => 'user'
|
||||
);
|
||||
|
||||
|
||||
@ -105,7 +114,7 @@ $var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("ActivateFCKeditor").'</td>';
|
||||
print '<td colspan="2">'.$langs->trans("ActivateFCKeditor").'</td>';
|
||||
print '<td align="center" width="20"> </td>';
|
||||
print '<td align="center" width="100">'.$langs->trans("Action").'</td>';
|
||||
print "</tr>\n";
|
||||
@ -118,6 +127,7 @@ foreach($modules as $const => $desc)
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="16">'.img_object("",$picto[$const]).'</td>';
|
||||
print '<td>'.$langs->trans($desc).'</td>';
|
||||
print '<td align="center" width="20">';
|
||||
|
||||
|
||||
@ -36,9 +36,22 @@ $user->getrights("mailing");
|
||||
if (! $user->rights->mailing->lire || $user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
$message = '';
|
||||
|
||||
// Tableau des substitutions possibles
|
||||
$substitutionarray=array(
|
||||
'__ID__' => 'IdRecord',
|
||||
'__EMAIL__' => 'EMail',
|
||||
'__LASTNAME__' => 'Lastname',
|
||||
'__FIRSTNAME__' => 'Firstname'
|
||||
);
|
||||
$substitutionarrayfortest=array(
|
||||
'__ID__' => 'TESTIdRecord',
|
||||
'__EMAIL__' => 'TESTEMail',
|
||||
'__LASTNAME__' => 'TESTLastname',
|
||||
'__FIRSTNAME__' => 'TESTFirstname'
|
||||
);
|
||||
|
||||
|
||||
// Action envoi mailing pour tous
|
||||
if ($_GET["action"] == 'sendall')
|
||||
@ -51,7 +64,7 @@ if ($_GET["action"] == 'sendall')
|
||||
}
|
||||
|
||||
// Action envoi test mailing
|
||||
if ($_POST["action"] == 'send')
|
||||
if ($_POST["action"] == 'send' && ! $_POST["cancel"])
|
||||
{
|
||||
$mil = new Mailing($db);
|
||||
$result=$mil->fetch($_POST["mailid"]);
|
||||
@ -74,7 +87,11 @@ if ($_POST["action"] == 'send')
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING) $msgishtml=1;
|
||||
if (eregi('[ \t]*<html>',$message)) $msgishtml=1;
|
||||
|
||||
$mailfile = new CMailFile($mil->sujet,$mil->sendto,$mil->email_from,$mil->body,
|
||||
// Pratique les substitutions sur le sujet et message
|
||||
$mil->sujet=make_substitutions($mil->sujet,$substitutionarrayfortest);
|
||||
$mil->body=make_substitutions($mil->body,$substitutionarrayfortest);
|
||||
|
||||
$mailfile = new CMailFile($mil->sujet,$mil->sendto,$mil->email_from,$mil->body,
|
||||
$arr_file,$arr_mime,$arr_name,
|
||||
'', '', 0, $msgishtml);
|
||||
|
||||
@ -85,7 +102,7 @@ if ($_POST["action"] == 'send')
|
||||
}
|
||||
else
|
||||
{
|
||||
$message='<div class="error">'.$langs->trans("ResultKo").'<br>'.$mailfile->error.'</div>';
|
||||
$message='<div class="error">'.$langs->trans("ResultKo").'<br>'.$mailfile->error.' '.$result.'</div>';
|
||||
}
|
||||
|
||||
$_GET["action"]='';
|
||||
@ -239,10 +256,10 @@ if ($_GET["action"] == 'create')
|
||||
print '<tr><td width="25%">'.$langs->trans("MailTopic").'</td><td><input class="flat" name="sujet" size="60" value=""></td></tr>';
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("MailMessage").'<br>';
|
||||
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
||||
print '__ID__ = '.$langs->trans("IdRecord").'<br>';
|
||||
print '__EMAIL__ = '.$langs->trans("EMail").'<br>';
|
||||
print '__LASTNAME__ = '.$langs->trans("Lastname").'<br>';
|
||||
print '__FIRSTNAME__ = '.$langs->trans("Firstname").'<br>';
|
||||
foreach($substitutionarray as $key => $val)
|
||||
{
|
||||
print $key.' = '.$langs->trans($val).'<br>';
|
||||
}
|
||||
print '</i></td>';
|
||||
print '<td>';
|
||||
// éditeur wysiwyg
|
||||
@ -292,13 +309,6 @@ else
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
// Confirmation de l'approbation du mailing
|
||||
if ($_GET["action"] == 'approve')
|
||||
{
|
||||
$html->form_confirm("fiche.php?id=".$mil->id,"Approuver le mailing","Confirmez-vous l'approbation du mailing ?","confirm_approve");
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
// Confirmation de la suppression
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
@ -394,7 +404,7 @@ else
|
||||
print '<br /><br /></div>';
|
||||
}
|
||||
|
||||
|
||||
// Affichage formulaire de TEST
|
||||
if ($_GET["action"] == 'test')
|
||||
{
|
||||
print_titre($langs->trans("TestMailing"));
|
||||
@ -404,6 +414,7 @@ else
|
||||
$formmail = new FormMail($db);
|
||||
$formmail->fromname = $mil->email_from;
|
||||
$formmail->frommail = $mil->email_from;
|
||||
$formmail->withsubstit=1;
|
||||
$formmail->withfrom=0;
|
||||
$formmail->withto=$user->email?$user->email:1;
|
||||
$formmail->withcc=0;
|
||||
@ -412,8 +423,9 @@ else
|
||||
$formmail->withfile=0;
|
||||
$formmail->withbody=0;
|
||||
$formmail->withbodyreadonly=1;
|
||||
$formmail->withcancel=1;
|
||||
// Tableau des substitutions
|
||||
$formmail->substit["__FACREF__"]=$fac->ref;
|
||||
$formmail->substit=$substitutionarrayfortest;
|
||||
// Tableau des paramètres complémentaires du post
|
||||
$formmail->param["action"]="send";
|
||||
$formmail->param["models"]="body";
|
||||
|
||||
@ -40,32 +40,34 @@
|
||||
class Conf
|
||||
{
|
||||
/** \public */
|
||||
//! Objet des caractéristiques de connexions
|
||||
var $db;
|
||||
|
||||
var $externalrss;
|
||||
var $commande;
|
||||
var $ficheinter;
|
||||
var $commercial;
|
||||
var $societe;
|
||||
var $expedition;
|
||||
var $compta;
|
||||
var $banque;
|
||||
var $don;
|
||||
var $caisse;
|
||||
var $fournisseur;
|
||||
var $adherent;
|
||||
var $produit;
|
||||
var $service;
|
||||
var $stock;
|
||||
var $boutique;
|
||||
var $projet;
|
||||
var $postnuke;
|
||||
var $webcal;
|
||||
var $mantis;
|
||||
var $propal;
|
||||
var $categorie;
|
||||
var $oscommerce2;
|
||||
//! Objet des caractéristiques de connexions
|
||||
var $db;
|
||||
//! Charset for HTML output
|
||||
var $character_set_client;
|
||||
|
||||
var $externalrss;
|
||||
var $commande;
|
||||
var $ficheinter;
|
||||
var $commercial;
|
||||
var $societe;
|
||||
var $expedition;
|
||||
var $compta;
|
||||
var $banque;
|
||||
var $don;
|
||||
var $caisse;
|
||||
var $fournisseur;
|
||||
var $adherent;
|
||||
var $produit;
|
||||
var $service;
|
||||
var $stock;
|
||||
var $boutique;
|
||||
var $projet;
|
||||
var $postnuke;
|
||||
var $webcal;
|
||||
var $mantis;
|
||||
var $propal;
|
||||
var $categorie;
|
||||
var $oscommerce2;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/html.form.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT ."/lib/functions.inc.php");
|
||||
|
||||
|
||||
/** \class FormMail
|
||||
@ -46,6 +47,7 @@ class FormMail
|
||||
var $toname;
|
||||
var $tomail;
|
||||
|
||||
var $withsubstit; // Show substitution array
|
||||
var $withfrom;
|
||||
var $withto;
|
||||
var $withtocc;
|
||||
@ -94,20 +96,6 @@ class FormMail
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* \brief Effectue les substitutions des mots clés par les données en fonction du tableau $this->substit
|
||||
* \param chaine chaine dans laquelle faire les substitutions
|
||||
* \return string chaine avec les substitutions effectuées
|
||||
*/
|
||||
function make_substitutions($chaine)
|
||||
{
|
||||
foreach ($this->substit as $key=>$value) {
|
||||
$chaine=ereg_replace($key,$value,$chaine);
|
||||
}
|
||||
return $chaine;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* \brief Affiche la partie de formulaire pour saisie d'un mail en fonction des propriétés
|
||||
*/
|
||||
@ -128,6 +116,19 @@ class FormMail
|
||||
}
|
||||
print "<table class=\"border\" width=\"100%\">\n";
|
||||
|
||||
// Substitution array
|
||||
if ($this->withsubstit)
|
||||
{
|
||||
print "<tr><td colspan=\"2\">";
|
||||
$help="";
|
||||
foreach($this->substit as $key => $val)
|
||||
{
|
||||
$help.=$key.' -> '.$langs->trans($val).'<br>';
|
||||
}
|
||||
print $form->textwithhelp($langs->trans("EMailTestSubstitutionReplacedByGenericValues"),$help);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// From
|
||||
if ($this->withfrom)
|
||||
{
|
||||
@ -212,7 +213,7 @@ class FormMail
|
||||
// Topic
|
||||
if ($this->withtopic)
|
||||
{
|
||||
$this->withtopic=$this->make_substitutions($this->withtopic);
|
||||
$this->withtopic=make_substitutions($this->withtopic,$this->substit);
|
||||
|
||||
print "<tr>";
|
||||
print "<td width=\"180\">".$langs->trans("MailTopic")."</td>";
|
||||
@ -251,7 +252,7 @@ class FormMail
|
||||
if ($this->param["models"]=='propal_send') { $defaultmessage="Veuillez trouver ci-joint la proposition commerciale __PROPREF__\n\nCordialement\n\n"; }
|
||||
if ($this->param["models"]=='order_send') { $defaultmessage="Veuillez trouver ci-joint la commande __ORDERREF__\n\nCordialement\n\n"; }
|
||||
|
||||
$defaultmessage=$this->make_substitutions($defaultmessage);
|
||||
$defaultmessage=$this->make_substitutions($defaultmessage,$this->substit);
|
||||
|
||||
print "<tr>";
|
||||
print "<td width=\"180\" valign=\"top\">".$langs->trans("MailText")."</td>";
|
||||
|
||||
@ -3,6 +3,7 @@ Version=Version
|
||||
VersionExperimental=Experimental
|
||||
VersionDevelopment=Development
|
||||
VersionUnknown=Unknown
|
||||
WarningModuleNotActive=Module <b>%s</b> must be enabled
|
||||
DolibarrSetup=Dolibarr setup
|
||||
DolibarrUser=Dolibarr user
|
||||
InternalUser=Internal user
|
||||
|
||||
@ -51,6 +51,7 @@ AddRecipients=Add recipients
|
||||
RemoveRecipient=Remove recipient
|
||||
CommonSubstitutions=Common substitutions
|
||||
YouCanAddYourOwnPredefindedListHere=You can add your own mails selector module here. For this take a look at the file htdocs/includes/modules/mailings/README.
|
||||
EMailTestSubstitutionReplacedByGenericValues=When using test mode, substitutions variables are replaced by generic values
|
||||
|
||||
# Libelle des modules de liste de destinataires mailing
|
||||
MailingModuleDescContactCompanies=Unique contacts of all third parties
|
||||
|
||||
@ -3,6 +3,7 @@ Version=Version
|
||||
VersionExperimental=Expérimental
|
||||
VersionDevelopment=Développement
|
||||
VersionUnknown=Inconnue
|
||||
WarningModuleNotActive=Module <b>%s</b> non actif
|
||||
DolibarrSetup=Installation de Dolibarr
|
||||
DolibarrUser=Utilisateur Dolibarr
|
||||
InternalUser=Utilisateur interne
|
||||
|
||||
@ -51,6 +51,7 @@ AddRecipients=Ajout de destinataires
|
||||
RemoveRecipient=Supprime destinataire
|
||||
CommonSubstitutions=Substitutions communes
|
||||
YouCanAddYourOwnPredefindedListHere=Vous pouvez ajouter votre propre module de sélection/import de mails. Pour cela, voir le fichier htdocs/includes/modules/mailings/README.
|
||||
EMailTestSubstitutionReplacedByGenericValues=En mode test, les variables de substitution sont remplacées par des valeurs génériques
|
||||
|
||||
# Libelle des modules de liste de destinataires mailing
|
||||
MailingModuleDescContactCompanies=Contacts des tiers (prospects, clients, fournisseurs...)
|
||||
|
||||
@ -216,7 +216,8 @@ class CMailFile
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_syslog("CMailFile::sendfile: No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS");
|
||||
$this->error='No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS';
|
||||
dolibarr_syslog("CMailFile::sendfile: ".$this->error);
|
||||
}
|
||||
|
||||
error_reporting($errorlevel); // Réactive niveau erreur origine
|
||||
@ -267,7 +268,7 @@ class CMailFile
|
||||
|
||||
if ($this->msgishtml)
|
||||
{
|
||||
$out.= "Content-Type: text/html; charset=".$conf->charset_output.$this->eol;
|
||||
$out.= "Content-Type: text/html; charset=".$conf->character_set_client.$this->eol;
|
||||
$out.= "Content-Transfer-Encoding: 8bit".$this->eol;
|
||||
}
|
||||
else
|
||||
|
||||
@ -2723,4 +2723,20 @@ function dol_microtime_float()
|
||||
return ((float)$usec + (float)$sec);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* \brief Effectue les substitutions des mots clés par les données en fonction du tableau
|
||||
* \param chaine Chaine dans laquelle faire les substitutions
|
||||
* \param substitutionarray Tableau clé substitution => valeur a mettre
|
||||
* \return string Chaine avec les substitutions effectuées
|
||||
*/
|
||||
function make_substitutions($chaine,$substitutionarray)
|
||||
{
|
||||
foreach ($substitutionarray as $key => $value)
|
||||
{
|
||||
$chaine=ereg_replace($key,$value,$chaine);
|
||||
}
|
||||
return $chaine;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user