Perf: On charge CMailFile que si besoin
This commit is contained in:
parent
5697f3c0de
commit
b03b4685cf
@ -203,11 +203,10 @@ class Adherent extends CommonObject
|
||||
$subjectosend = preg_replace ($patterns, $replace, $subject);
|
||||
|
||||
// Envoi mail confirmation
|
||||
include_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
|
||||
$from=$conf->email_from;
|
||||
if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
$mailfile = new CMailFile($subjectosend,$this->email,$from,$texttosend,
|
||||
$filename_list,$mimetype_list,$mimefilename_list,
|
||||
$addr_cc, $addr_bcc, $deliveryreceipt, $html);
|
||||
|
||||
@ -85,8 +85,6 @@ if ($_POST["action"] == 'send' && ! $_POST["cancel"])
|
||||
}
|
||||
if ($sendto)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
|
||||
// Le message est-il en html
|
||||
$msgishtml=0; // Non par defaut
|
||||
//if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING) $msgishtml=1;
|
||||
@ -96,6 +94,7 @@ if ($_POST["action"] == 'send' && ! $_POST["cancel"])
|
||||
$subject=make_substitutions($subject,$substitutionarrayfortest);
|
||||
$body=make_substitutions($body,$substitutionarrayfortest);
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
$mailfile = new CMailFile($subject,$sendto,$email_from,$body,
|
||||
$filepath,$mimetype,$filename,
|
||||
'', '', 0, $msgishtml,$errors_to);
|
||||
|
||||
@ -76,8 +76,6 @@ if ($_POST["action"] == 'send' && ! $_POST["cancel"])
|
||||
}
|
||||
if ($mil->sendto)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
|
||||
$arr_file = array();
|
||||
$arr_mime = array();
|
||||
$arr_name = array();
|
||||
@ -91,6 +89,7 @@ if ($_POST["action"] == 'send' && ! $_POST["cancel"])
|
||||
$mil->sujet=make_substitutions($mil->sujet,$substitutionarrayfortest);
|
||||
$mil->body=make_substitutions($mil->body,$substitutionarrayfortest);
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
$mailfile = new CMailFile($mil->sujet,$mil->sendto,$mil->email_from,$mil->body,
|
||||
$arr_file,$arr_mime,$arr_name,
|
||||
'', '', 0, $msgishtml);
|
||||
|
||||
@ -47,7 +47,6 @@ if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php
|
||||
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/propal.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/actioncomm.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||
|
||||
$sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"];
|
||||
if (isset($_GET["msg"])) { $mesg=urldecode($_GET["mesg"]); }
|
||||
@ -382,6 +381,7 @@ if ($_POST['action'] == 'send')
|
||||
}
|
||||
|
||||
// Envoi de la propal
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,'',$deliveryreceipt);
|
||||
if ($mailfile->error)
|
||||
{
|
||||
|
||||
@ -33,7 +33,6 @@ require('./pre.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/commande/modules_commande.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/actioncomm.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
|
||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php');
|
||||
if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/propal.class.php');
|
||||
@ -632,6 +631,7 @@ if ($_POST['action'] == 'send')
|
||||
}
|
||||
|
||||
// Envoi de la commande
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,'',$deliveryreceipt);
|
||||
if ($mailfile->error)
|
||||
{
|
||||
|
||||
@ -36,7 +36,6 @@ require_once(DOL_DOCUMENT_ROOT.'/facture.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/discount.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php');
|
||||
if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/propal.class.php');
|
||||
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php');
|
||||
@ -1030,6 +1029,7 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['c
|
||||
}
|
||||
|
||||
// Envoi de la facture
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,'',$deliveryreceipt);
|
||||
if ($mailfile->error)
|
||||
{
|
||||
@ -2053,7 +2053,8 @@ else
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans('ShowPayment'),'payment').' ';
|
||||
print dolibarr_print_date($objp->dp,'day').'</a></td>';
|
||||
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement.'</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td><td>'.$langs->trans('Currency'.$conf->monnaie).'</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
@ -2083,7 +2084,10 @@ else
|
||||
$invoice->fetch($obj->fk_facture_source);
|
||||
print $invoice->getNomUrl(0);
|
||||
print ' :</td>';
|
||||
print '<td align="right" style="border: 1px solid;">'.price($obj->amount_ttc).'</td><td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>';
|
||||
print '<td align="right" style="border: 1px solid;">'.price($obj->amount_ttc).'</td>';
|
||||
print '<td nowrap="nowrap">'.$langs->trans('Currency'.$conf->monnaie);
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=unlinkdiscount&discountid='.$obj->rowid.'">'.img_delete().'</a>';
|
||||
print '</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php');
|
||||
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
||||
|
||||
|
||||
@ -216,8 +216,7 @@ class DroitPret
|
||||
$sendtocc = "";
|
||||
$deliveryreceipt = "";
|
||||
|
||||
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,'',$deliveryreceipt);
|
||||
if ($mailfile->error)
|
||||
{
|
||||
|
||||
@ -17,8 +17,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -31,7 +29,6 @@
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT ."/product/droitpret/droitpret.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT ."/product/droitpret/modules_droitpret.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php');
|
||||
|
||||
|
||||
global $conf;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user