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

[TASK] Changing file extensions

parent 3d8ed659
No related branches found
No related tags found
1 merge request!1Feature sg mail
......@@ -109,17 +109,17 @@ class MailController extends ActionController {
$this->view->assign('selectedExtensionKey', $selectedExtensionKey);
$this->view->assign(
'contentLeft', file_get_contents($templatePath . $selectedLanguageLeft . '.sg_mail.locallang.sgm')
'contentLeft', file_get_contents($templatePath . $selectedLanguageLeft . '.sg_mail.locallang.html')
);
$this->view->assign(
'contentRight', file_get_contents($templatePath . $selectedLanguageRight . '.sg_mail.locallang.sgm')
'contentRight', file_get_contents($templatePath . $selectedLanguageRight . '.sg_mail.locallang.html')
);
} else {
$this->view->assign('selectedLanguageLeft', 'en');
$this->view->assign('contentLeft', file_get_contents($templatePath . 'en.sg_mail.locallang.sgm'));
$this->view->assign('contentLeft', file_get_contents($templatePath . 'en.sg_mail.locallang.html'));
$this->view->assign('selectedLanguageRight', 'en');
$this->view->assign('contentRight', file_get_contents($templatePath . 'en.sg_mail.locallang.sgm'));
$this->view->assign('contentRight', file_get_contents($templatePath . 'en.sg_mail.locallang.html'));
}
}
......@@ -128,7 +128,7 @@ class MailController extends ActionController {
* @param string $path
*/
private function writeLanguageFile(\TYPO3\CMS\Lang\Domain\Model\Language $language, $path) {
$currentLangFile = $path . $language->getLocale() . '.sg_mail.locallang.sgm';
$currentLangFile = $path . $language->getLocale() . '.sg_mail.locallang.html';
if (!file_exists($currentLangFile)) {
$currentLangFile = fopen($currentLangFile, 'w');
$langFileContent = 'TEST: ' . $language->getLocale();
......@@ -136,4 +136,10 @@ class MailController extends ActionController {
}
}
public function saveAction() {
$args = $this->request->getArguments();
$this->redirect('index');
}
}
......@@ -53,9 +53,9 @@ class MailTemplateService {
'templateName' => $templateName
];
$defaultLangFile = $templatePath . 'en.sg_mail.locallang.sgm';
$defaultLangFile = $templatePath . 'en.sg_mail.locallang.html';
if (!file_exists($defaultLangFile)) {
$defaultLangFile = fopen($templatePath . 'en.sg_mail.locallang.sgm', 'w');
$defaultLangFile = fopen($templatePath . 'en.sg_mail.locallang.html', 'w');
$langFileContent = 'TEST';
fwrite($defaultLangFile, $langFileContent);
}
......
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