From 4c169c1636492b19e51ccaf0298151f2ccc1d503 Mon Sep 17 00:00:00 2001 From: Torsten Oppermann <torsten@sgalinski.de> Date: Tue, 6 Nov 2018 20:29:57 +0100 Subject: [PATCH] [TASK] Fixing minor issues --- Classes/Controller/MailController.php | 6 ++---- Classes/Service/MailTemplateService.php | 2 +- Classes/Service/RegisterService.php | 2 +- README.md | 2 +- Resources/Private/Language/de.locallang.xlf | 4 ++-- Resources/Private/Language/locallang.xlf | 2 +- Resources/Private/Templates/Mail/Index.html | 1 - 7 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Classes/Controller/MailController.php b/Classes/Controller/MailController.php index c8adb40d..053b2f0d 100644 --- a/Classes/Controller/MailController.php +++ b/Classes/Controller/MailController.php @@ -385,12 +385,10 @@ class MailController extends ActionController { } // provide code example on how to register correctly - $code = '$GLOBALS[\'sgmail\'][\'' . $extensionName . '\'][\'' + $code = '$GLOBALS[\'sg_mail\'][\'' . $extensionName . '\'][\'' . \str_replace('.php', '', $configFile) - . '\'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(\'' - . $extensionName . '\') . \'/Configuration/SgMail/' . $configFile . '\';'; + . '\'] = \'EXT:' . $extensionName . '/Configuration/SgMail/' . $configFile . '\';'; $deprecationWarnings[] = [ - 'file' => $configFile, 'code' => $code ]; } diff --git a/Classes/Service/MailTemplateService.php b/Classes/Service/MailTemplateService.php index 00955618..b85c0244 100644 --- a/Classes/Service/MailTemplateService.php +++ b/Classes/Service/MailTemplateService.php @@ -824,7 +824,7 @@ class MailTemplateService { if (!\file_exists($pathToRegistrationFile)) { continue; } - $GLOBALS['sgmail']['sg_mail'][$configFile] = $pathToRegistrationFile; + $GLOBALS['sg_mail']['sg_mail'][$configFile] = $pathToRegistrationFile; } } } diff --git a/Classes/Service/RegisterService.php b/Classes/Service/RegisterService.php index e7303531..b15a509a 100644 --- a/Classes/Service/RegisterService.php +++ b/Classes/Service/RegisterService.php @@ -91,7 +91,7 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface { MailTemplateService::registerExtensions(); } - foreach ($GLOBALS['sgmail'] as $extension) { + foreach ($GLOBALS['sg_mail'] as $extension) { foreach ($extension as $key => $registerFile) { if (\is_file($registerFile)) { $configArray = (include $registerFile); diff --git a/README.md b/README.md index 89d2f985..f1c8e47d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ sg_mail ist multi-site and multi-language ready. To register your extension with sg_mail, you need a **Configuration File** for each template you want to integrate. It needs be a *.php* file and has to be inside the Configuration folder **typo3conf/ext/{your_extension}/Configuration/Sgmail** of your extension. -Additionally you need to make your registration file known in your **ext_local_conf.php** file: +Additionally you need to make your registration file known in your **ext_localconf.php** file: // register mail templates $GLOBALS['sgmail']['my_extension_key']['unique_template_name'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('my_extension_key') . '/Configuration/SgMail/MyTemplate.php'; diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf index fde8d277..e9dd416e 100644 --- a/Resources/Private/Language/de.locallang.xlf +++ b/Resources/Private/Language/de.locallang.xlf @@ -107,9 +107,9 @@ </trans-unit> <trans-unit id="backend.deprecationInfo" approved="yes" xml:space="preserve"> <source><![CDATA[Some template configurations have been registered in an old way and won`t work in future versions. -Please register your configurations in the according ext_local_conf.php.]]></source> +Please register your configurations in the according ext_localconf.php.]]></source> <target><![CDATA[Es wurden Template Registrierungen entdeckt, die in zukünftigen Versionen nicht mehr funktionieren werden. -Bitte registrieren Sie Ihre Templates in den entsprechenden ext_local_conf.php Dateien.]]></target> +Bitte registrieren Sie Ihre Templates in den entsprechenden ext_localconf.php Dateien.]]></target> </trans-unit> <trans-unit id="backend.description" approved="yes"> <source><![CDATA[Description]]></source> diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index f361e405..dd8c833b 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -50,7 +50,7 @@ </trans-unit> <trans-unit id="backend.deprecationInfo" xml:space="preserve"> <source><![CDATA[Some template configurations have been registered in an old way and won`t work in future versions. -Please register your configurations in the according ext_local_conf.php.]]></source> +Please register your configurations in the according ext_localconf.php.]]></source> </trans-unit> <trans-unit id="backend.configuration"> <source><![CDATA[Configuration editor]]></source> diff --git a/Resources/Private/Templates/Mail/Index.html b/Resources/Private/Templates/Mail/Index.html index 8b2a7de2..769aaff7 100644 --- a/Resources/Private/Templates/Mail/Index.html +++ b/Resources/Private/Templates/Mail/Index.html @@ -34,7 +34,6 @@ <div id="deprecationPanel" class="collapse"> <div class="panel-body"> <f:for each="{deprecationWarnings}" as="warning"> - <b>{warning.file}</b><br> <small>{warning.code}</small> <br> </f:for> -- GitLab