diff --git a/Classes/Controller/AddressController.php b/Classes/Controller/AddressController.php index 1979ab1..1e28e9e 100644 --- a/Classes/Controller/AddressController.php +++ b/Classes/Controller/AddressController.php @@ -235,7 +235,7 @@ protected function errorAction() * action form only * * @param Address $newAddress - * @dontvalidate $newAddress + * @ignorevalidation $newAddress * @return void */ public function formOnlyAction(Address $newAddress = NULL) @@ -247,7 +247,7 @@ public function formOnlyAction(Address $newAddress = NULL) * action new * * @param Address $newAddress - * @dontvalidate $newAddress + * @ignorevalidation $newAddress * @return void */ public function newAction(Address $newAddress = NULL) diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php new file mode 100644 index 0000000..b99caaa --- /dev/null +++ b/Configuration/TCA/Overrides/sys_template.php @@ -0,0 +1,5 @@ + - Adresse konnte nicht in unserer Datenbank gefunden werden. + Die Adresse konnte nicht in unserer Datenbank gefunden werden. zustimmen @@ -93,10 +93,10 @@ E-Mail: %3s Sie sind nun vom Newsletter abgemeldet. - Adresse konnte nicht in unserer Datenbank gefunden werden. + Die Adresse konnte nicht in unserer Datenbank gefunden werden. - Dem löschen zustimmen + Dem Löschen zustimmen @@ -106,7 +106,7 @@ E-Mail: %3s Newsletter abbestellen - Adresse konnte nicht in unserer Datenbank gefunden werden. + Die Adresse konnte nicht in unserer Datenbank gefunden werden. Eine E-Mail mit den Daten wurde an Sie gesendet. @@ -133,9 +133,15 @@ Versuchen Sie es bitte erneut. Bitte klicken Sie folgenden Link, um Ihre Daten zu bearbeiten: + + Bearbeiten + Bitte klicken Sie folgenden Link, um Ihre Anmeldung zu löschen: + + Anmeldung löschen + Newsletter-Information @@ -149,12 +155,21 @@ Versuchen Sie es bitte erneut. Bitte bestätigen Sie Ihre Anmeldung mit Klick auf folgenden Link: + + Bestätigen + Wenn Sie sich nicht für den Newsletter anmelden wollen, dann klicken Sie bitte folgenden Link: + + Anmeldung widerrufen + Wenn Sie Ihre persönlichen Daten ändern wollen, dann klicken Sie bitte folgenden Link: + + Daten ändern + Newsletter-Registrierung @@ -199,8 +214,7 @@ Versuchen Sie es bitte erneut. - You will apply the following consent. - Sie stimmen den folgenden Bedingungen zu. + Sie stimmen den folgenden Bedingungen zu. diff --git a/Resources/Private/Language/de.locallang_db.xlf b/Resources/Private/Language/de.locallang_db.xlf index 0a923d2..19dff48 100644 --- a/Resources/Private/Language/de.locallang_db.xlf +++ b/Resources/Private/Language/de.locallang_db.xlf @@ -40,13 +40,10 @@ Consent Einwilligung - - Einwilligungstext - Consent text + Consent text + Einwilligungstext - - diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 9a5c99f..31b5e46 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -17,13 +17,13 @@ Mr - Mrs + Ms First name - Middle Vorname + Middle name Last name @@ -41,7 +41,7 @@ Dear Mrs - Hallo + Hello Dear Reader @@ -124,7 +124,7 @@ Please try again. Mr - Mrs + Ms @@ -133,9 +133,15 @@ Please try again. Please click the following link to edit your data: + + Edit data + Please click the following link to delete your registration: + + Delete registration + Newsletter-Information @@ -149,12 +155,21 @@ Please try again. Please confirm your subscription by clicking on the following link: + + Confirm + If you do not want to subscribe for the newsletter, please click the following link: + + Reject subscription + If you want to change your personal data, please click the following link: + + Change data + Newsletter-Subscription @@ -202,7 +217,6 @@ Please try again. You will apply the following consent. - diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index 8f79a3a..00dfe9b 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -31,15 +31,12 @@ Consent - registerttaddress Address - - Einwilligungstext + Consent text - diff --git a/Resources/Private/Templates/Address/Approve.html b/Resources/Private/Templates/Address/Approve.html index 632a82f..67530f0 100644 --- a/Resources/Private/Templates/Address/Approve.html +++ b/Resources/Private/Templates/Address/Approve.html @@ -17,7 +17,7 @@ -

+

diff --git a/Resources/Private/Templates/Address/Create.html b/Resources/Private/Templates/Address/Create.html index 67e0659..91961b0 100644 --- a/Resources/Private/Templates/Address/Create.html +++ b/Resources/Private/Templates/Address/Create.html @@ -15,11 +15,11 @@ -


+


-

+

diff --git a/Resources/Private/Templates/Address/Delete.html b/Resources/Private/Templates/Address/Delete.html index 3984f6a..daee160 100644 --- a/Resources/Private/Templates/Address/Delete.html +++ b/Resources/Private/Templates/Address/Delete.html @@ -17,7 +17,7 @@ -

+

diff --git a/Resources/Private/Templates/Address/Information.html b/Resources/Private/Templates/Address/Information.html index e8f0b14..4b8769c 100644 --- a/Resources/Private/Templates/Address/Information.html +++ b/Resources/Private/Templates/Address/Information.html @@ -18,7 +18,7 @@

-

+

diff --git a/Resources/Private/Templates/Address/MailNewsletterInformation.html b/Resources/Private/Templates/Address/MailNewsletterInformation.html index 031abc0..310415d 100644 --- a/Resources/Private/Templates/Address/MailNewsletterInformation.html +++ b/Resources/Private/Templates/Address/MailNewsletterInformation.html @@ -3,9 +3,9 @@

{f:translate(key:'mail.info.editLinkText')} - {f:link.action(action: 'edit', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()} + {f:translate(key:'mail.info.editLink') -> f:link.action(action: 'edit', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()}

{f:translate(key:'mail.info.deleteLinkText')} - {f:link.action(action: 'delete', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()} + {f:translate(key:'mail.info.deleteLink') -> f:link.action(action: 'delete', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()}

diff --git a/Resources/Private/Templates/Address/MailNewsletterRegistration.html b/Resources/Private/Templates/Address/MailNewsletterRegistration.html index ea746f5..d56b253 100644 --- a/Resources/Private/Templates/Address/MailNewsletterRegistration.html +++ b/Resources/Private/Templates/Address/MailNewsletterRegistration.html @@ -2,7 +2,7 @@ {f:translate(key:'mail.registration.greet')} {f:translate(key:'mail.gender.{address.gender}')} {address.firstName} {address.lastName}

- {f:translate(key:'mail.registration.text', htmlEscape:0)} + {f:translate(key:'mail.registration.text')}

{f:translate(key:'mail.registration.consentText')} @@ -10,13 +10,13 @@

{f:translate(key:'mail.registration.approveLinkText')} - {f:link.action(action: 'approve', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()} + {f:translate(key:'mail.registration.approveLink') -> f:link.action(action: 'approve', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()}

{f:translate(key:'mail.registration.deleteLinkText')} - {f:link.action(action: 'delete', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()} + {f:translate(key:'mail.registration.deleteLink') -> f:link.action(action: 'delete', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()}

{f:translate(key:'mail.registration.editLinkText')} - {f:link.action(action: 'edit', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()} + {f:translate(key:'mail.registration.editLink') -> f:link.action(action: 'edit', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()}

diff --git a/Resources/Private/Templates/Address/MailNewsletterRegistration.txt b/Resources/Private/Templates/Address/MailNewsletterRegistration.txt index 9d62f80..15fd9ee 100644 --- a/Resources/Private/Templates/Address/MailNewsletterRegistration.txt +++ b/Resources/Private/Templates/Address/MailNewsletterRegistration.txt @@ -1,6 +1,6 @@ {f:translate(key:'mail.registration.greet')} {f:translate(key:'mail.gender.{address.gender}')} {address.firstName} {address.lastName} -{f:translate(key:'mail.registration.text', htmlEscape:0)} +{f:translate(key:'mail.registration.text')} {f:translate(key:'mail.registration.consentText')} {address.consent -> f:format.html(parseFuncTSPath:"plugin.tx_registeraddress.lib.parseFunc_PLAIN") -> f:format.stripTags()} diff --git a/Resources/Private/Templates/Address/MailNewsletterUnsubscribe.html b/Resources/Private/Templates/Address/MailNewsletterUnsubscribe.html index 8e98969..422a45c 100644 --- a/Resources/Private/Templates/Address/MailNewsletterUnsubscribe.html +++ b/Resources/Private/Templates/Address/MailNewsletterUnsubscribe.html @@ -3,5 +3,5 @@

{f:translate(key:'mail.info.deleteLinkText')} - {f:link.action(action: 'delete', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()} + {f:translate(key:'mail.info.deleteLink') -> f:link.action(action: 'delete', arguments: {hash: hash}, controller: 'Address', extensionName: 'registeraddress', pluginName: 'registerform', noCacheHash: 1, pageUid: settings.pagewithform, absolute: 1) -> f:format.htmlentitiesDecode()}

diff --git a/class.ext_update.php b/class.ext_update.php index 37dcc46..17ab3d3 100644 --- a/class.ext_update.php +++ b/class.ext_update.php @@ -30,15 +30,8 @@ class ext_update */ public function __construct() { - $typo3Version = VersionNumberUtility::getNumericTypo3Version(); - if (VersionNumberUtility::convertVersionNumberToInteger($typo3Version) >= 8000000) { - // If TYPO3 version is version 8 or higher - $this->queryBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Database\ConnectionPool::class)->getQueryBuilderForTable('tt_address'); - $this->queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class)); - } else { - // For TYPO3 Version 7 or lower - $this->databaseConnection = $GLOBALS['TYPO3_DB']; - } + $this->queryBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Database\ConnectionPool::class)->getQueryBuilderForTable('tt_address'); + $this->queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class)); } /** @@ -47,30 +40,18 @@ public function __construct() * * @return bool */ - public function access() { - - $typo3Version = VersionNumberUtility::getNumericTypo3Version(); - if (VersionNumberUtility::convertVersionNumberToInteger($typo3Version) >= 8000000) { - // If TYPO3 version is version 8 or higher - $count = $this->queryBuilder->count('uid') - ->from('tt_address') - ->where( - $this->queryBuilder->expr()->eq( - 'registeraddresshash', - $this->queryBuilder->createNamedParameter('') - ) + public function access() + { + $count = $this->queryBuilder->count('uid') + ->from('tt_address') + ->where( + $this->queryBuilder->expr()->eq( + 'registeraddresshash', + $this->queryBuilder->createNamedParameter('') ) - ->execute() - ->fetchColumn(0); - } else { - // For TYPO3 Version 7 or lower - $count = $this->databaseConnection->exec_SELECTcountRows( - 'uid', - 'tt_address', - 'registeraddresshash=""' - ); - } - + ) + ->execute() + ->fetchColumn(0); return ($count > 0); } @@ -80,66 +61,38 @@ public function access() { * @return string * @throws \Exception */ - public function main() { - + public function main() + { $content = ''; - - $typo3Version = VersionNumberUtility::getNumericTypo3Version(); - if (VersionNumberUtility::convertVersionNumberToInteger($typo3Version) >= 8000000) { - // If TYPO3 version is version 8 or higher - $addresslist = $this->queryBuilder->select('uid', 'registeraddresshash', 'email') - ->from('tt_address') - ->where( - $this->queryBuilder->expr()->eq( - 'registeraddresshash', - $this->queryBuilder->createNamedParameter('') - ) + $addresslist = $this->queryBuilder->select('uid', 'registeraddresshash', 'email') + ->from('tt_address') + ->where( + $this->queryBuilder->expr()->eq( + 'registeraddresshash', + $this->queryBuilder->createNamedParameter('') ) - ->groupBy('uid') - ->execute()->fetchAll(); + ) + ->groupBy('uid') + ->execute()->fetchAll(); - foreach ($addresslist as $fixAddress) { - $content .= 'Updating tt_address uid:' . $fixAddress['uid'] . PHP_EOL; + foreach ($addresslist as $fixAddress) { + $content .= 'Updating tt_address uid:' . $fixAddress['uid'] . PHP_EOL; - $rnd = microtime(true) . random_int(10000, 90000); - $regHash = sha1($fixAddress['email'] . $rnd); + $rnd = microtime(true) . random_int(10000, 90000); + $regHash = sha1($fixAddress['email'] . $rnd); - $this->queryBuilder->update('tt_address') - ->set('registeraddresshash', $regHash) - ->where( - $this->queryBuilder->expr()->eq( - 'uid', - $this->queryBuilder->createNamedParameter($fixAddress['uid']) - ) + $this->queryBuilder->update('tt_address') + ->set('registeraddresshash', $regHash) + ->where( + $this->queryBuilder->expr()->eq( + 'uid', + $this->queryBuilder->createNamedParameter($fixAddress['uid']) ) - ->execute(); - } - - } else { - // For TYPO3 Version 7 or lower - $addresslist = $this->databaseConnection->exec_SELECTquery( - 'uid, registeraddresshash, email', - 'tt_address', - 'registeraddresshash=""' - ); - - foreach ($addresslist as $fixAddress) { - $content .= 'Updating tt_address uid:' . $fixAddress['uid'] . PHP_EOL; - - $rnd = microtime(true) . random_int(10000, 90000); - $regHash = sha1($fixAddress['email'] . $rnd); - - $this->databaseConnection->exec_UPDATEquery( - 'tt_address', - 'uid = "'.$fixAddress['uid'].'"', - ['registeraddresshash' => $regHash] - ); - } + ) + ->execute(); } $content .= 'tt_address entries updates finished.' . PHP_EOL; - return nl2br($content); - } } diff --git a/composer.json b/composer.json index 4b17ed7..eac8507 100644 --- a/composer.json +++ b/composer.json @@ -7,8 +7,8 @@ "issues": "https://github.com/lsascha/registeraddress/issues" }, "require": { - "typo3/cms-core": ">=6.2.0 <8.99.99", - "friendsoftypo3/tt-address": ">=3.1.0 <3.2.99" + "typo3/cms-core": ">=9.5.0 <9.5.99", + "friendsoftypo3/tt-address": ">=4.0.0 <5.99.99" }, "replace": { "registeraddress": "self.version", diff --git a/ext_emconf.php b/ext_emconf.php index 3ec5632..d1644d1 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -27,11 +27,11 @@ 'modify_tables' => '', 'clearCacheOnLoad' => 0, 'lockType' => '', - 'version' => '2.0.1', + 'version' => '2.0.2', 'constraints' => array( 'depends' => array( - 'typo3' => '6.2.0-8.7.99', - 'tt_address' => '3.1.0-3.3.99', + 'typo3' => '9.5.0-9.5.99', + 'tt_address' => '4.0.0-5.99.99', ), 'conflicts' => array( ), diff --git a/ext_tables.php b/ext_tables.php deleted file mode 100644 index 84c7aa1..0000000 --- a/ext_tables.php +++ /dev/null @@ -1,29 +0,0 @@ -