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

[TASK] Fixing a bug with the right template. Initial template state read completely now

parent 53992592
No related branches found
No related tags found
No related merge requests found
...@@ -120,11 +120,16 @@ class MailController extends ActionController { ...@@ -120,11 +120,16 @@ class MailController extends ActionController {
$selectedExtension, $selectedTemplate, $selectedLanguageLeft $selectedExtension, $selectedTemplate, $selectedLanguageLeft
); );
$templateRight = $this->templateRepository->findOneByTemplate( $templateRight = $this->templateRepository->findOneByTemplate(
$selectedExtensionKey, $selectedTemplateKey, $selectedLanguageRight $selectedExtension, $selectedTemplate, $selectedLanguageRight
); );
if ($templateLeft !== NULL) { if ($templateLeft !== NULL) {
$this->view->assign('contentLeft', $templateLeft->getContent()); $this->view->assign('contentLeft', $templateLeft->getContent());
$this->view->assign('fromNameLeft', $templateLeft->getFromName());
$this->view->assign('fromMailLeft', $templateLeft->getFromMail());
$this->view->assign('ccLeft', $templateLeft->getCc());
$this->view->assign('bccLeft', $templateLeft->getBcc());
$this->view->assign('replyToLeft', $templateLeft->getReplyTo());
} else { } else {
$defaultTemplatePath = $registerArray[$selectedExtension][$selectedTemplate]['templatePath']; $defaultTemplatePath = $registerArray[$selectedExtension][$selectedTemplate]['templatePath'];
$defaultTemplateFile = $defaultTemplatePath . $selectedLanguageLeft . '.' . 'template.html'; $defaultTemplateFile = $defaultTemplatePath . $selectedLanguageLeft . '.' . 'template.html';
...@@ -135,6 +140,11 @@ class MailController extends ActionController { ...@@ -135,6 +140,11 @@ class MailController extends ActionController {
if ($templateRight !== NULL) { if ($templateRight !== NULL) {
$this->view->assign('contentRight', $templateRight->getContent()); $this->view->assign('contentRight', $templateRight->getContent());
$this->view->assign('fromNameRight', $templateRight->getFromName());
$this->view->assign('fromMailRight', $templateRight->getFromMail());
$this->view->assign('ccRight', $templateRight->getCc());
$this->view->assign('bccRight', $templateRight->getBcc());
$this->view->assign('replyToRight', $templateRight->getReplyTo());
} else { } else {
$defaultTemplatePath = $registerArray[$selectedExtension][$selectedTemplate]['templatePath']; $defaultTemplatePath = $registerArray[$selectedExtension][$selectedTemplate]['templatePath'];
$defaultTemplateFile = $defaultTemplatePath . $selectedLanguageRight . '.' . 'template.html'; $defaultTemplateFile = $defaultTemplatePath . $selectedLanguageRight . '.' . 'template.html';
......
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