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
1b115f68
Commit
1b115f68
authored
Sep 22, 2017
by
Torsten Oppermann
Browse files
[TASK] Fixing missing pid issue, and defualt lang issue
parent
a2b0bb93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Classes/Service/MailTemplateService.php
View file @
1b115f68
...
...
@@ -80,7 +80,7 @@ class MailTemplateService {
/**
* @var string $language
*/
private
$language
;
private
$language
=
'default'
;
/**
* @var boolean $ignoreMailQueue
...
...
@@ -169,7 +169,6 @@ class MailTemplateService {
/** @var TypoScriptSettingsService $typoScriptSettingsService */
$typoScriptSettingsService
=
$this
->
objectManager
->
get
(
TypoScriptSettingsService
::
class
);
$this
->
tsSettings
=
$typoScriptSettingsService
->
getSettings
(
0
,
'tx_sgmail'
);
$this
->
language
=
$this
->
tsSettings
[
'templateDefaultLanguage'
];
/** @var TemplateRepository templateRepository */
$this
->
templateRepository
=
$this
->
objectManager
->
get
(
TemplateRepository
::
class
);
/** @var PersistenceManager persistenceManager */
...
...
@@ -322,6 +321,9 @@ class MailTemplateService {
$pageUid
=
(
int
)
GeneralUtility
::
_GP
(
'id'
);
}
if
(
$this
->
pid
)
{
$pageUid
=
$this
->
pid
;
}
$siteRootId
=
BackendService
::
getSiteRoot
(
$pageUid
);
/** @var Template $template */
...
...
@@ -766,7 +768,9 @@ class MailTemplateService {
$templateDirectory
.
=
ucfirst
(
$part
);
}
$templateDirectory
.
=
'/'
;
$templatePath
=
ExtensionManagementUtility
::
extPath
(
$extensionName
)
.
self
::
DEFAULT_TEMPLATE_PATH
.
$templateDirectory
;
$templatePath
=
ExtensionManagementUtility
::
extPath
(
$extensionName
)
.
self
::
DEFAULT_TEMPLATE_PATH
.
$templateDirectory
;
if
(
$config
[
'template_path'
])
{
$templatePath
=
$config
[
'template_key'
];
...
...
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