Skip to content
Snippets Groups Projects
Commit 66ae7518 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Respect subject, removed subject translation

parent 854d86aa
No related branches found
No related tags found
1 merge request!6Feature 4 3
...@@ -143,13 +143,10 @@ class MailController extends ActionController { ...@@ -143,13 +143,10 @@ class MailController extends ActionController {
$templateFromFile->setLanguage($key); $templateFromFile->setLanguage($key);
$templates[$key] = $templateFromFile; $templates[$key] = $templateFromFile;
$templateFromFile->setSubject($subject);
if (file_exists($defaultTemplateFile)) { if (file_exists($defaultTemplateFile)) {
$templateFromFile->setContent(file_get_contents($defaultTemplateFile)); $templateFromFile->setContent(file_get_contents($defaultTemplateFile));
$templateFromFile->setSubject($subject);
} else { } else {
// set subject from register array
$templateFromFile->setSubject(LocalizationUtility::translate($subject, $this->extensionName));
if (file_exists($fallbackTemplateFile)) { if (file_exists($fallbackTemplateFile)) {
$templateFromFile->setContent(file_get_contents($fallbackTemplateFile)); $templateFromFile->setContent(file_get_contents($fallbackTemplateFile));
} }
...@@ -162,7 +159,7 @@ class MailController extends ActionController { ...@@ -162,7 +159,7 @@ class MailController extends ActionController {
// calculating optimal column width for the view // calculating optimal column width for the view
$colspace = 4; $colspace = 4;
$templateCount = count($templates); $templateCount = \count($templates);
if ($templateCount % 2 === 0 && $templateCount <= 4) { if ($templateCount % 2 === 0 && $templateCount <= 4) {
$colspace = 6; $colspace = 6;
} elseif ($templateCount === 1) { } elseif ($templateCount === 1) {
......
...@@ -331,11 +331,6 @@ class MailTemplateService { ...@@ -331,11 +331,6 @@ class MailTemplateService {
if (is_array($subject)) { if (is_array($subject)) {
$subject = self::getRegisterArray( $subject = self::getRegisterArray(
)[$this->extensionKey][$this->templateName]['subject'][$this->language]; )[$this->extensionKey][$this->templateName]['subject'][$this->language];
} else {
$subject = LocalizationUtility::translate(
self::getRegisterArray()[$this->extensionKey][$this->templateName]['subject'],
$this->extensionKey
);
} }
} }
$this->mailMessage->setSubject($subject); $this->mailMessage->setSubject($subject);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment