* Tweaking locallang for TYPO3 < 4.6.x
authorivankartolo <ivankartolo@735d13b6-9817-0410-8766-e36946ffe9aa>
Tue, 1 Nov 2011 10:30:40 +0000 (10:30 +0000)
committerivankartolo <ivankartolo@735d13b6-9817-0410-8766-e36946ffe9aa>
Tue, 1 Nov 2011 10:30:40 +0000 (10:30 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/direct_mail_subscription/trunk@53597 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
pi/class.dmailsubscribe.php
pi/fe_admin_dmailsubscrip.tmpl

index dfbaf5a..8f3aa95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2011-11-01 Ivan Kartolo <ivan.kartolo@dkd.de>
+       * Tweaking locallang for TYPO3 < 4.6.x 
+       
 2011-10-31 Ivan Kartolo <ivan.kartolo@dkd.de>
        * #29677: tweaking captcha in infomail
 
index 3fc376f..fafc3ef 100644 (file)
@@ -191,6 +191,17 @@ class user_dmailsubscribe {
                                $this->LOCAL_LANG = t3lib_div::readLLfile($basePath,$this->altLLkey);
                        }
 
+                       //compatibility to pre 4.6.x locallang handling
+                       if (!t3lib_div::compat_version('4.6.0')) {
+                               $tempLocalLang = $this->LOCAL_LANG;
+                               unset($this->LOCAL_LANG);
+                               foreach($tempLocalLang as $langKey => $langArr) {
+                                       foreach ($langArr as $labelK => $labelV ) {
+                                               $this->LOCAL_LANG[$langKey][$labelK][0]['target'] = $labelV;
+                                       }
+                               }
+                       }
+
                                // Overlaying labels from TypoScript (including fictitious language keys for non-system languages!):
                        $confLL = $this->conf['_LOCAL_LANG.'];
                        if (is_array($confLL)) {
index 1cc344e..333df54 100644 (file)
@@ -650,7 +650,7 @@ Email: ###FIELD_email###
 <!--###SUB_RECORD###-->
 TYPO3 Testsite Newsletter, Admin link
 
-Dear ###FIELD_name###
+Dear ###FIELD_tx_directmailsubscription_localgender### ###FIELD_name###
 
 Click here to edit your personal data
 ###THIS_URL######FORM_URL###&cmd=edit&aC=###SYS_AUTHCODE###&rU=###FIELD_uid###