Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
TYPO3
sg_mail
Commits
024a2a92
Commit
024a2a92
authored
Sep 26, 2019
by
Fabian Galinski
😾
Browse files
[BUGFIX] The placeholders of the mail subject aren't replaced
parent
f25c625a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Classes/Service/MailTemplateService.php
View file @
024a2a92
...
...
@@ -697,12 +697,21 @@ class MailTemplateService {
$emailView
->
assignMultiple
(
$this
->
markers
);
$emailView
->
assign
(
'all_fields'
,
$this
->
getAllMarker
(
$this
->
markers
));
$overwrittenEmailBody
=
$this
->
getOverwrittenEmailBody
();
$overwrittenSubject
=
''
;
if
(
$this
->
subject
!==
''
&&
$this
->
subject
!==
NULL
)
{
$overwrittenSubject
=
$this
->
subject
;
}
if
(
$template
!==
NULL
)
{
$emailView
->
setTemplateSource
(
\
trim
(
$template
->
getSubject
()));
$emailView
->
setTemplateSource
(
\
trim
(
empty
(
$overwrittenSubject
)
?
$template
->
getSubject
()
:
$overwrittenSubject
)
);
$subject
=
$emailView
->
render
();
$overwrittenEmailBody
=
$this
->
getOverwrittenEmailBody
();
$emailView
->
setTemplateSource
(
empty
(
$overwrittenEmailBody
)
?
$template
->
getContent
()
:
$overwrittenEmailBody
);
$emailView
->
setTemplateSource
(
empty
(
$overwrittenEmailBody
)
?
$template
->
getContent
()
:
$overwrittenEmailBody
);
}
else
{
$subject
=
$registerService
->
getRegisterArray
()[
$this
->
extensionKey
][
$this
->
templateName
][
'subject'
];
if
(
\
is_array
(
$subject
))
{
...
...
@@ -711,18 +720,13 @@ class MailTemplateService {
[
$this
->
extensionKey
][
$this
->
templateName
][
'subject'
][
$this
->
language
]
);
}
if
(
$subject
===
NULL
&&
$this
->
subject
!==
NULL
)
{
$subject
=
$this
->
subject
;
}
if
(
$subject
!==
NULL
)
{
$emailView
->
setTemplateSource
(
$subject
);
$subject
=
$emailView
->
render
();
}
$emailView
->
setTemplateSource
(
empty
(
$overwrittenEmailBody
)
?
$defaultTemplateContent
:
$overwrittenEmailBody
);
}
if
(
$this
->
subject
!==
''
&&
$this
->
subject
!==
NULL
)
{
$subject
=
$this
->
subject
;
$emailView
->
setTemplateSource
(
empty
(
$overwrittenSubject
)
?
$subject
:
$overwrittenSubject
);
$subject
=
$emailView
->
render
();
$emailView
->
setTemplateSource
(
empty
(
$overwrittenEmailBody
)
?
$defaultTemplateContent
:
$overwrittenEmailBody
);
}
$this
->
mailMessage
->
setSubject
(
$subject
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment