mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-15 22:11:36 +01:00
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
This commit is contained in:
@@ -930,14 +930,14 @@ class Notify
|
||||
// content will be sent.
|
||||
$mailTemplateLabel = isset($conf->global->{$notifcode.'_TEMPLATE'}) ? $conf->global->{$notifcode.'_TEMPLATE'} : '';
|
||||
$emailTemplate = null;
|
||||
// Set output language
|
||||
$outputlangs = $langs;
|
||||
if (!empty($mailTemplateLabel)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($this->db);
|
||||
$emailTemplate = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse);
|
||||
}
|
||||
if (!empty($mailTemplateLabel) && is_object($emailTemplate) && $emailTemplate->id > 0) {
|
||||
// Set output language
|
||||
$outputlangs = $langs;
|
||||
if ($obj->default_lang && $obj->default_lang != $langs->defaultlang) {
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang($obj->default_lang);
|
||||
|
||||
Reference in New Issue
Block a user