mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 06:35:54 -05:00
Fixed email language selection, #3527
This commit is contained in:
parent
836ad768ac
commit
19dfb43f30
@ -66,6 +66,7 @@ module.exports.CreateMeshMail = function (parent, domain) {
|
|||||||
function getTemplate(name, domain, lang) {
|
function getTemplate(name, domain, lang) {
|
||||||
parent.debug('email', 'Getting mail template for: ' + name + ', lang: ' + lang);
|
parent.debug('email', 'Getting mail template for: ' + name + ', lang: ' + lang);
|
||||||
if (Array.isArray(lang)) { lang = lang[0]; } // TODO: For now, we only use the first language given.
|
if (Array.isArray(lang)) { lang = lang[0]; } // TODO: For now, we only use the first language given.
|
||||||
|
if (lang != null) { lang = lang.split('-')[0]; } // Take the first part of the language, "xx-xx"
|
||||||
|
|
||||||
var r = {}, emailsPath = null;
|
var r = {}, emailsPath = null;
|
||||||
if ((domain != null) && (domain.webemailspath != null)) { emailsPath = domain.webemailspath; }
|
if ((domain != null) && (domain.webemailspath != null)) { emailsPath = domain.webemailspath; }
|
||||||
|
Loading…
Reference in New Issue
Block a user